Re: [RFC] RNG fixes

From: Date: Thu, 23 Jun 2016 20:35:27 +0000
Subject: Re: [RFC] RNG fixes
References: 1 2 3 4 5 6 7 8 9 10 11 12  Groups: php.internals 
Request: Send a blank email to internals+get-94238@lists.php.net to get a copy of this message
On 6/23/16 12:56 PM, Stanislav Malyshev wrote:
Hi!
I would prefer something like random_fast_int() == mt_rand() == rand(), with clear documentation on when to use random_fast_int() instead of random_int(), and a note on the others that "since 7.2, mt_rand() is an alias for random_fast_int()" etc. (Not wedded to the name random_fast_int, we can bikeshed that later.)
That sounds to me like a good way to proceed too. I don't think it's a big deal it mt_rand won't be using specific MT algorithm anymore, I see very small number of places where it would matter.
For these cases https://packagist.org/packages/leigh/mt-rand Tom

« previous php.internals (#94238) next »