← All docs

array_shift() — internals

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

array_shift() — internals

Where it lives

Lowering notes

  • Lowers array_shift() for indexed arrays by compacting slots and boxing T|null as Mixed.

Runtime helpers

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

Signature summary

function array_shift(array $array): mixed

What the type checker enforces

  • Arity: takes exactly 1 argument.
  • By-reference parameters: $array.

Eval interpreter (magician)

Cross-references