note 25075 added to function.mt-srand
| From: | php-general at lists dot php dot net | Date: | Tue, 10 Sep 2002 07:19:29 +0000 |
| Subject: | note 25075 added to function.mt-srand | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-36419@lists.php.net to get a copy of this message | ||
couldn't there be a mt_srand() call in a future release, which allows specifying NO parameter.
In that case, it would use an entropy source appropriate for the platform on which PHP is compiled.
If this cause problems, why not added a new API such as mt_srand_entropy(), that could be emulated
partly on previous PHP versions, when missing, by using something like this:
function mt_srand_entropy() {
mt_srand(time()
^ (int)microtime()
^ ip2long($_SERVER['REMOTE_ADDR'])
);
}
--
http://www.php.net/manual/en/function.mt-srand.php
http://master.php.net/manage/user-notes.php?action=edit+25075
http://master.php.net/manage/user-notes.php?action=delete+25075
http://master.php.net/manage/user-notes.php?action=reject+25075