int rand ( [ int $min, int $max ] )
rand() generates a random number between $min and $max
※ available F/W version : all
Returns a random number between $min and $max, PHP error on error
<?php
echo (string)rand() . "\r\n"; // OUTPUT: random number (0 ~ 9223372036854775807)
echo (string)rand(10) . "\r\n"; // OUTPUT: random number (10 ~ 9223372036854775807)
echo (string)rand(5, 15) . "\r\n"; // OUTPUT: random number (5 ~ 15)
?>
None
This function is identical to the PHP group’s rand() function except output value range and number of input parameter.