mirror of
https://github.com/php/php-src.git
synced 2024-09-22 10:27:25 +00:00
7f0b228f48
* Fix pre-PHP 8.2 compatibility for php_mt_rand_range() with MT_RAND_PHP As some left-over comments indicated: > Legacy mode deliberately not inside php_mt_rand_range() > to prevent other functions being affected The broken scaler was only used for `php_mt_rand_common()`, not `php_mt_rand_range()`. The former is only used for `mt_rand()`, whereas the latter is used for `array_rand()` and others. With the refactoring for the introduction of ext/random `php_mt_rand_common()` and `php_mt_rand_range()` were accidentally unified, thus introducing a behavioral change that was reported in FakerPHP/Faker#528. This commit moves the checks for `MT_RAND_PHP` from the general-purpose `range()` function back into `php_mt_rand_common()` and also into `Randomizer::getInt()` for drop-in compatibility with `mt_rand()`. * [ci skip] NEWS for `MT_RAND_PHP` compatibility |
||
---|---|---|
.. | ||
tests | ||
config.m4 | ||
config.w32 | ||
CREDITS | ||
engine_combinedlcg.c | ||
engine_mt19937.c | ||
engine_pcgoneseq128xslrr64.c | ||
engine_secure.c | ||
engine_user.c | ||
engine_xoshiro256starstar.c | ||
php_random.h | ||
random_arginfo.h | ||
random.c | ||
random.stub.php | ||
randomizer.c |