On Wed, Dec 16, 2020 at 8:46 AM zeriyoshi <zeriyo...@gmail.com> wrote:
> Nice to meet you, internals.
>

Welcome! I'm about to knock down your suggestion a little, but please take
it as constructive feedback.

> First , PHP has the historical Mersenne Twister PRNG. However, this
> implementation keeps its state in a global and cannot be handled as an
> object like other languages (e.g. Java).
>

Can you clarify what object handling provides?  Is the intent to have an
expanded API for producing a reliably predictable series of numbers based
on more finely tunable seeds? Iterable PRNG generator?

> So, I created a PHP Extension and proposed it to PECL.
>
> https://marc.info/?l=pecl-dev&m=160795415604102&w=2
> https://github.com/zeriyoshi/php-ext-orng
>

Bundling extensions usually comes when an extension has shown widespread
popularity/use.  With all due respect, this repo is less than two weeks old
and has 8 stars. Who needs this and why is it not services by the PRNG and
CSPRNG options already available?

> With the development of container technology, this problem seems to be
> getting more serious. So I think we should use the random numbers provided
> by the OS (getrandom on Linux) if available.
>

We've had that since 7.0:

https://www.php.net/random_bytes
https://www.php.net/random_int

-Sara

Reply via email to