← All docs

array_splice() — internals

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

array_splice() — internals

Where it lives

Lowering notes

  • Lowers array_splice() by mutating an indexed source array and returning removed elements.

Runtime helpers

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

Signature summary

function array_splice(array $array, int $offset, int $length = null): array

What the type checker enforces

  • Arity: takes 2–3 arguments (1 optional).
  • By-reference parameters: $array.

Eval interpreter (magician)

Cross-references