← All docs

array_reduce() — internals

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

array_reduce() — internals

Where it lives

Lowering notes

  • Lowers array_reduce() through the callback-driven runtime helper.

Runtime helpers

The following runtime helpers are referenced:

  • __rt_array_reduce

Signature summary

function array_reduce(array $array, callable $callback, mixed $initial = null): int

What the type checker enforces

  • Arity: takes 2–3 arguments (1 optional).

Eval interpreter (magician)

Cross-references