mt_rand()
function mt_rand(int $min, int $max): int
Generate a random value via the Mersenne Twister Random Number Generator.
Parameters:
$min(int)$max(int)
Returns: int
Availability
- Compiled (AOT): supported by the Elephc code generator.
eval()(magician interpreter): supported — declarative interpreter builtin (crates/elephc-magician/src/interpreter/builtins/math/mt_rand.rs).
No examples yet — check examples/ and showcases/ for usage patterns.
Internals
For how mt_rand is implemented in the compiler, see the internals page.