← All docs

array_multisort() — internals

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

array_multisort() — internals

Where it lives

Lowering notes

  • Lowers array_multisort(): stable-sorts the first indexed array ascending and reorders the second
  • in tandem, both in place. Both arguments are by-reference, so each is copy-on-write split with
  • ensure_unique_sort_source and the (possibly relocated) pointer is written back to its local
  • before the runtime mutates the storage. Returns true. Supports 8-byte scalar indexed arrays.

Runtime helpers

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

Signature summary

function array_multisort(array $array1, int $array2): bool

What the type checker enforces

  • Arity: takes exactly 2 arguments.
  • By-reference parameters: $array1, $array2.

Eval interpreter (magician)

Not callable from eval’d code — the magician interpreter has no entry for this builtin.

Cross-references