On 23/06/2016 14:57, Nikita Popov wrote:
Whatever we do, please maintain the invariant that mt_rand() >= rand()
in terms of quality. I recommend doing this by making mt_rand() == rand().

The relationship that I feel is poorly defined at the moment is random_int() vs mt_rand(). There isn't actually anything in the manual to say when *not* to use it. So the implication seems to be random_int() > mt_rand() > rand().

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.)

Regards,
--
Rowan Collins
[IMSoP]

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to