On 23.02.2016 at 11:41, Yasuo Ohgaki wrote: > Actual range could be determined by PHP_RAND_MAX/PHP_MT_RAND_MAX, but > I heard Windows' PHP_RAND_MAX is only 2^15. Is this correct?
Yes, see <https://msdn.microsoft.com/en-us/library/398ax69y.aspx>. > Any comments for adding out of range warnings to rand()/mt_rand()? If > nobody has comment on this, I'll write RFC for additional warnings. > Anyone prefer to extend rand()/mt_rand() for 64bit OSes? See also the discussion for <https://github.com/php/php-src/pull/1416>; it might make sense to disallow such ranges in the long run (i.e. for PHP 8), in which case we might want to raise deprecated notices instead of warnings now. -- Christoph M. Becker -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php