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.

One thing to consider is that there might be test scenarios, sequences,
etc. that depend on specific seed and will be broken by changing the
implementation (tests relying on specific rand are not the very best
idea, but they do happen), but I think this kind of thing may be
acceptable for a major version. Would like to hear thoughts on this though.
-- 
Stas Malyshev
smalys...@gmail.com

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

Reply via email to