Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:115954 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 68569 invoked from network); 5 Sep 2021 03:36:38 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 5 Sep 2021 03:36:38 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 826091804B4 for ; Sat, 4 Sep 2021 21:13:29 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-ej1-f50.google.com (mail-ej1-f50.google.com [209.85.218.50]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sat, 4 Sep 2021 21:13:29 -0700 (PDT) Received: by mail-ej1-f50.google.com with SMTP id mf2so6326091ejb.9 for ; Sat, 04 Sep 2021 21:13:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=WMl8bKswUJNSjk1mC8+dhxVfnknVu3EL0HJ5t3L183E=; b=cMdM3KJCE6TMT0DJkU3qzJ5lh+wxkEL4Z/yEzDZA90p0q8LzrMHR/tGHEap5WAnCby w+eh4t1xe0Bi5pxho9uDZUhxwhH/VJmOoqMxiQ0LIiYJBZq6NAPjRfErAlpPABi0+4if HguPMpluIn+g/E+LO9cShA76X9w+1ZhZV8annX2PUMEWwATjLMEaRZo6jW8H1KZmAaH/ n4ZsU5Xx1qvjZooyo/P49e8D3juzGG0CNVjQUN2sBhJplCPa4h+Qen7Yr3G3ZdD37rRq Gd5cu7u4FPM2/oqrU1Seind7ywq84zQIxasI7F/YWmta+vNkClT6uq6lnGlpDD4A/g31 XXpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=WMl8bKswUJNSjk1mC8+dhxVfnknVu3EL0HJ5t3L183E=; b=SV6WclZ0phyRdXKQ9JraQM6HP/8+KQqosgreNRrWNtd3/H/9L/stx9V4xZHi5wp6SW 87IVAt0MHRM8a/54hR27Rcr16rDg0JKW8VbdfW34lyC6drFP+Sl4WuAnSxacGN7zfIiX iosmu1UzhpGecO/ABN6qph4tEpu7PSvZWtY3VzSvdHezS1RK6VCgSy0gA2cxKh8CEW+u aLNIzPeUiyhBfIJiespMDk/YTYCajB0cz7JBB4GzzalvK6FWPJoFh/EXLLXNLRAAWa+H 7kTXYjEso5t4rC08HSbQaEOPIqVjssj5zHqUFvuGkyVG9xoOyrA+Uv5bKm55Zt6ZWscQ VghQ== X-Gm-Message-State: AOAM53034Tz2SLyVJ850JGrYW0UvtVI/42j6nkl8OAbM+sqxBodM32nk EwQdmmSt8dDYP+u49Ef4imFM1yXQAX0GZWYRroI= X-Google-Smtp-Source: ABdhPJxJmzfO/3/vHLOcsSxMb7JHIBy40aBL/VhNaAqexexeCY9zP7pTxJUJMNu5EMS91fYSRZr1JZnQ7KcaqYMVCMU= X-Received: by 2002:a17:906:4751:: with SMTP id j17mr7162686ejs.145.1630815206255; Sat, 04 Sep 2021 21:13:26 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Sun, 5 Sep 2021 13:13:15 +0900 Message-ID: To: Marc , PHP internals Content-Type: multipart/alternative; boundary="000000000000102f4805cb37c11f" Subject: Re: [PHP-DEV] [RFC] Random Extension 3.0 From: zeriyoshi@gmail.com (Go Kudo) --000000000000102f4805cb37c11f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks marc. > "shuffleString()" works on byte level and so it should be "shuffleBytes()". Hmm. This may be a difficult problem related to the PHP language specification. As with `str_shuffle()`, most people will probably use it to shuffle strings. People who want to shuffle binaries are likely to understand that in PHP it is synonymous with `shuffleBytes()`. > Why are there no default values for min/max on "getInt()" - It seems unnecessary to me to pass min/max arguments My apologies. I completely forgot that I needed this. Add this along with a fix for the RNG\NumberGenerator implementation. Regards, Go Kudo 2021=E5=B9=B49=E6=9C=885=E6=97=A5(=E6=97=A5) 5:57 Marc : > > On 9/2/21 5:10 PM, Go Kudo wrote: > > Hi Internals. > > > > Expanded from the previous RFC and changed it to an RFC that organizes > the > > whole PHP random number generator. Also, the target version has been > > changed to 8.2. > > > > https://wiki.php.net/rfc/rng_extension > > https://github.com/php/php-src/pull/7453 > > > > Hopefully you will get some good responses. > > For me (user land developer with no voting power) your RFC looks pretty := ) > > Beside the abstract vs interface question I have some other notes: > > On the one hand you define "getBytes()" which returns a string and on > the other hand you define "shuffleString()" - is the first one a binary > string and the other a charset dependent string? I guess here > "shuffleString()" works on byte level and so it should be "shuffleBytes()= ". > > Why are there no default values for min/max on "getInt()" - It seems > unnecessary to me to pass min/max arguments if you are just interested > in a random integer or passing max as well if you are interested in a > positive integer only. > > Thanks for the nice RFC! > > > Regards, > > Go Kudo > Marc > --000000000000102f4805cb37c11f--