RFC [Discussion]: Randomizer Additions

From: Date: Thu, 13 Oct 2022 19:37:37 +0000
Subject: RFC [Discussion]: Randomizer Additions
Groups: php.internals 
Request: Send a blank email to internals+get-118810@lists.php.net to get a copy of this message
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

« previous php.internals (#118810) next »