Hi all,

On Thu, Feb 25, 2016 at 6:31 AM, Yasuo Ohgaki <yohg...@ohgaki.net> wrote:
>> I think it would be preferable to wait a bit -- there's clearly interest in
>> replacing rand/mt_rand etc with a higher quality PRNG, so maybe lets give
>> people time to create a proposal for that before we start throwing warnings.
>
> Reasonable suggestion!
> Adding warnings is trivial. It could done before RC.
> I'll wait until then.

I updated the doc for the time being.

http://svn.php.net/viewvc?view=revision&revision=338662

MT rand range is 2^32, but our mt_rand() implementation is 2^31.
http://lxr.php.net/xref/PHP_5_6/ext/standard/rand.c#331

Because RAND_RANGE() macro simply does arithmetic on supplied
parameters, out of range values result in biased numbers. Therefore, I
replaced mt_rand() caution to my warning.

Regards,

--
Yasuo Ohgaki
yohg...@ohgaki.net

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

Reply via email to