← All docs

array_replace()

Replaces elements from passed arrays into the first array.

array_replace()

function array_replace(array $array, array $replacements): mixed

Replaces elements from passed arrays into the first array.

Parameters:

  • $array (array)
  • $replacements (array)

Returns: mixed

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

Internals

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