← All docs

array_slice() — internals

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

array_slice() — internals

Where it lives

Lowering notes

  • Lowers array_slice() for indexed arrays with pointer-sized payload slots.

Runtime helpers

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

Signature summary

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

What the type checker enforces

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

Eval interpreter (magician)

Cross-references