← All docs

array_map() — internals

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

array_map() — internals

Where it lives

Lowering notes

  • Lowers array_map() through the callback runtime helper matching the callback result type.

Runtime helpers

No direct __rt_* helpers captured — the lowering is inlined or routes through another builtin.

Signature summary

function array_map(callable $callback, array $array, ...$arrays): array

What the type checker enforces

  • Arity: takes exactly 2 arguments.
  • Variadic: collects excess arguments into $arrays.

Eval interpreter (magician)

Cross-references