← All docs

array_merge_recursive()

Recursively merges two arrays, combining scalar collisions into lists.

array_merge_recursive()

function array_merge_recursive(...$arrays): array

Recursively merges two arrays, combining scalar collisions into lists.

Parameters:

  • ...$arrays — variadic: collects excess arguments into $arrays.

Returns: array

Availability

  • Compiled (AOT): supported by the Elephc code generator.
  • eval() (magician interpreter): not available inside eval’d code.

No examples yet — check examples/ and showcases/ for usage patterns.

Internals

For how array_merge_recursive is implemented in the compiler, see the internals page.