← All docs

array_replace_recursive()

Replaces elements from passed arrays into the first array recursively.

array_replace_recursive()

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

Replaces elements from passed arrays into the first array recursively.

Parameters:

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

Returns: mixed

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

Internals

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