← All docs

range() — internals

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

range() — internals

Where it lives

Lowering notes

  • Lowers range() for integer endpoints through the shared runtime constructor.

Runtime helpers

The following runtime helpers are referenced:

  • __rt_mixed_cast_int
  • __rt_range

Signature summary

function range(mixed $start, mixed $end): array

What the type checker enforces

  • Arity: takes exactly 2 arguments.

Eval interpreter (magician)

Cross-references