ALL
A trap about PHP random number
The method to get random number in PHP is very simple, we only need to use rand() function.int rand ( int $min , int $max ) One function call can return the random number in a specified range. But in fact, the random number in computer is actually pseudorandomness, generally to increase the randomness, we may set a random seed before calling rand().void srand ([ int $seed ] ) According to other language features, we should pass a time value as a parameter to the srand() function, generally we may pass millisecond or microsecond. Starting from PHP 4.2, srand() will be automatically called whe...