← All docs

shuffle() — internals

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

shuffle() — internals

Where it lives

Lowering notes

  • Lowers shuffle() for indexed arrays with 8-byte slots by mutating the source array in place.

Runtime helpers

The following runtime helpers are referenced:

  • __rt_array_is_list

Signature summary

function shuffle(array $array): bool

What the type checker enforces

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

Eval interpreter (magician)

Cross-references