Random generators provide functions to get the value of MAX_RAND
<?php echo "getrandmax = " . getrandmax() . "\n"; echo "mt_getrandmax = " . mt_getrandmax() . "\n"; ?>