← All docs

mt_rand() — internals

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

mt_rand() — internals

Where it lives

Lowering notes

  • Lowers rand() and mt_rand() with either zero args or an inclusive range.

Runtime helpers

The following runtime helpers are referenced:

  • __rt_random_u32

Signature summary

function mt_rand(int $min, int $max): int

What the type checker enforces

  • Arity: takes exactly 2 arguments.

Eval interpreter (magician)

Cross-references