Re: [RFC] RNG fixes
| From: | Stanislav Malyshev | Date: | Wed, 22 Jun 2016 21:28:22 +0000 |
| Subject: | Re: [RFC] RNG fixes | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-94217@lists.php.net to get a copy of this message | ||
Hi!
> I haven't been following this thread, just jumping in to comment on this
> point. My suggestion to deprecate rand() was motivated by the fact that
> rand() produces extremely low quality random numbers on Windows, while at
Why not fix it then?
> the same time having the name people are most likely to try first if they
> want to have a random number. It's a bad state of things if there's a
> rand() and an mt_rand() function and the latter is preferable in *all*
> situations, while the former is more likely to be used. However, this
> concern is completely alleviated by aliasing rand() to mt_rand(). If we do
Exactly, one of the ways. If mt_rand for some (unknown to me) reason is
not good enough, I'm sure we can find a better one.
--
Stas Malyshev
smalyshev@gmail.com