← All docs

iterator_to_array() — internals

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

iterator_to_array() — internals

Where it lives

Lowering notes

  • Lowers iterator_to_array() over arrays, iterable, and Traversable objects.

Runtime helpers

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

Signature summary

function iterator_to_array(traversable $iterator, bool $preserve_keys = true): array

What the type checker enforces

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

Eval interpreter (magician)

Cross-references