Seeds the random number generator with seed.
// seed with microseconds function make_seed() { list($usec, $sec) = explode(' ', microtime()); return (float) $sec + ((float) $usec * 100000); } srand(make_seed()); $randval = rand(); |
See also rand(), getrandmax(), mt_rand(), mt_srand(), and mt_getrandmax().