note 14774 added to function.srand.php
| From: | akukula at min dot pl | Date: | Tue, 14 Aug 2001 11:14:19 +0000 |
| Subject: | note 14774 added to function.srand.php | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-16694@lists.php.net to get a copy of this message | ||
Calling srand((double)microtime()*1000000),
then $a=rand(1000000,9999999), then srand((double)microtime()*$a)
adds nothing to the entrophy: the execution time of rand and srand is
constant, so the second microtime() produces nothing really fascinating. You may safely use just the
first srand().
http://www.php.net/manual/en/function.srand.php