Re: Re: [RFC] [VOTE] Random Extension 5.x
| From: | Tim Düsterhus | Date: | Fri, 17 Jun 2022 17:14:35 +0000 |
| Subject: | Re: Re: [RFC] [VOTE] Random Extension 5.x | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-117986@lists.php.net to get a copy of this message | ||
Hi
On 6/17/22 19:04, Go Kudo wrote:
RFC has been updated. Includes corrections to areas pointed out by Tim and changes MersenneTwister to MT19937. I also made it possible to vote for each item.I suggest to split the "PCG is not so famous" vote into 2 votes to make it clear how exactly the majority is calculated and to have a clear primary vote as indicated in https://wiki.php.net/rfc/voting#required_majority
https://wiki.php.net/rfc/random_extension_improvement How about it? for Tim:I don't think that ->pickString() is a good name, because it is not really comparable to pickArrayKey(): pickArrayKey() will return each key only once. It is more comparable to:I believe you missed my suggestion (4)My apologies! I had completely missed that. That new feature sounds good to me. But, I think the method namepickString()would be better. (It is interoperable withpickArrayKey())
substr($r->shuffleString('0123456789abcdef'), 0, 6)
My proposed ->randomString() must be able to return a character multiple times.
If you don't like ->randomString(), I have an alternative suggestion: ->stringFromCharset()
Best regards
Tim Düsterhus