- var_dump: documentation ( source)
- mt_rand: documentation ( source)
- mt_srand: documentation ( source)
- mt_getrandmax: documentation ( source)
- define: documentation ( source)
<?php
mt_srand(1234);
var_dump(mt_rand(100,1));
define("UL", mt_getrandmax()+1000);
$r=mt_rand(0, UL);
var_dump($r);
if ($r < 0 || $r > UL)
echo "Random value out of range\n";