← All docs

array_replace() — internals

Compiler internals for array_replace(): lowering path, type checks, and runtime helpers.

array_replace() — internals

Where it lives

Lowering notes

  • Lowers array_replace() (right-wins hash merge of two hashes).

Runtime helpers

The following runtime helpers are referenced:

  • __rt_array_replace
  • __rt_array_replace_recursive
  • __rt_assoc_diff_intersect

Signature summary

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

What the type checker enforces

  • Arity: takes exactly 2 arguments.

Eval interpreter (magician)

Not callable from eval’d code — the magician interpreter has no entry for this builtin.

Cross-references