← All docs

iterator_apply() — internals

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

iterator_apply() — internals

Where it lives

Lowering notes

  • Lowers iterator_apply() over supported Traversable sources and callback forms.

Runtime helpers

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

Signature summary

function iterator_apply(traversable $iterator, callable $callback, array $args = null): int

What the type checker enforces

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

Cross-references