← All docs

usort() — internals

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

usort() — internals

Where it lives

Lowering notes

  • Lowers usort() for indexed integer arrays with a static user comparator.

Runtime helpers

The following runtime helpers are referenced:

  • __rt_array_is_list

Signature summary

function usort(array $array, callable $callback): bool

What the type checker enforces

  • Arity: takes exactly 2 arguments.
  • By-reference parameters: $array.

Eval interpreter (magician)

Cross-references