← All docs

array_merge()

Merges the elements of two arrays.

array_merge()

function array_merge(...$arrays): array

Merges the elements of two arrays.

Parameters:

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

Returns: array

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

Internals

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