note 25075 rejected from function.mt-srand by zak
| From: | zak@php.net | Date: | Tue, 10 Sep 2002 07:35:09 +0000 |
| Subject: | note 25075 rejected from function.mt-srand by zak | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-36421@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'])
);
}