Hi
Tim Düsterhus and I have created an RFC to add new methods that solve
commonly encountered use cases to \Random\Randomizer. Specifically
creating a random string consisting of specific bytes and generating
random floating point values.
You can find the RFC at:
https://wiki.php.net/rfc/randomizer_additions
Proof of concept implementation is in:
* https://github.com/php/php-src/pull/9664
* https://github.com/php/php-src/pull/9679
----
Some open questions to start the discussion:
* Are you missing other commonly useful operations that are also useful
to have in core?
* Do you agree with the method names? Within the PR we received comments
that "alphabet" might not be an appropriate term.
* Shall an option be added to getFloat() that changes the logic to
select from [$min, $max] (i.e. allowing the maximum to be returned)? And
how should that look like? Boolean parameter? Enum?
----
We're looking forward to your feedback.
Cheers
Joshua Rüsweg
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php