2022年8月4日(木) 17:10 Anton Smirnov <sand...@sandfox.me>:

> Hi!
>
> Randomness again. Sorry if I just missed some relevant discussion
>
> xoshiro** has a known edge case: all-zero seed
>
> <?php
>
> $engine = new \Random\Engine\Xoshiro256StarStar(str_repeat("\0", 32));
>
> while (true) {
>     echo hex2bin($engine->generate()), PHP_EOL; // 0000000000000000
> }
>
> It should be documented and/or handled
>
> It's only for a string seed, int seed is not affected
>
> --
> Anton
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: https://www.php.net/unsub.php
>
>
Hi.

Thanks for the report! This is dangerous behavior and we will attempt to
fix it for 8.2beta3.

Best regards
Go Kudo

Reply via email to