Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:118845 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 63638 invoked from network); 18 Oct 2022 19:50:27 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 18 Oct 2022 19:50:27 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 896F41804F8 for ; Tue, 18 Oct 2022 12:50:26 -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=-1.3 required=5.0 tests=BAYES_00,BODY_8BITS, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS19151 66.111.4.0/24 X-Spam-Virus: No X-Envelope-From: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 18 Oct 2022 12:50:25 -0700 (PDT) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 44E805C0145 for ; Tue, 18 Oct 2022 15:50:23 -0400 (EDT) Received: from imap50 ([10.202.2.100]) by compute1.internal (MEProxy); Tue, 18 Oct 2022 15:50:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= garfieldtech.com; h=cc:content-transfer-encoding:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to; s=fm3; t=1666122623; x=1666209023; bh=IxuwGgbiq85nBm5jbNaZP33aq eMjL25dnSZbMcON9qE=; b=nLVhiZCQCspJF02tTjhGn1syn/pxGfDpwu6oBYsN6 6+PsHyn6rdYDZ3XEEevqAmnyVRIaiDsoE/B4EjGogcIXisYQNovu1nQ0F7FbrAOL l9nwadbWegoKEaM+egoNzMLbZ5FPz8OreC0C0mCM61qi0yWYNJRo9YKzs08merc9 QvMmYh6IiqRQOAVE7diNsC0lD9IOTTwE7Q1NLoJCUWc0Wvkq2/LA9j9UIdJmND/D 0BXmA/AQoUvF66xc89WqiNpij9N1wKGP+p/jkWQ/Ubv7f/z38ecjJZHWf2ummxRA KKrIFEsC+Oc1B9alhBqva/sxd79eqMv/i6gEbnowvLmrQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:date:feedback-id:feedback-id:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1666122623; x=1666209023; bh=I xuwGgbiq85nBm5jbNaZP33aqeMjL25dnSZbMcON9qE=; b=QhyMH0hYhFoVj/RU5 JIXmGNd4fFFdKdvdB0DRavXSm3VIoMFVhbQOvlHs+OqAAMXmj946tfcxvtbcMuRL Fjc/VbCGke8sZAAostmNjVli1ip9soB2mCdZR90FdbzN5akc/erwiIk0EyRHWJDc 2z3UyDEAMwWhkFNLaSDQUc6wplPJXc8V9oYQePQ9R3SKbHEQ4lZ+tNAL7cZcngSm FSRZcTLfiO2928EcWzbCelesbRF9yaxUesPBZdDrjQFgj7aBaGnnjtbcvGmGjwVs vQXJ1garYMDJP+6duZwf2ElgHlYmMy+ttISSTd5VLmDih4Y1+NxsGMPuhfJzGUUB mLAKw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfeelvddgudduudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefofgggkfgjfhffhffvufgtgfesthhqredtreerjeenucfhrhhomhepfdfn rghrrhihucfirghrfhhivghlugdfuceolhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrd gtohhmqeenucggtffrrghtthgvrhhnpeeggeehgfetjeehgefggefhleeugefgtdejieev vdethfevgeeuudefleehvdetieenucffohhmrghinhepphhhphdrnhgvthenucevlhhush htvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehlrghrrhihsehgrghr fhhivghlughtvggthhdrtghomh X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id CAA491700086; Tue, 18 Oct 2022 15:50:22 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.7.0-alpha0-1047-g9e4af4ada4-fm-20221005.001-g9e4af4ad Mime-Version: 1.0 Message-ID: <71552420-ae73-4404-b149-49e73ec29d20@app.fastmail.com> In-Reply-To: References: <5ceebae4-a3fb-5d29-cdb7-dceed7b07c78@wcflabs.de> Date: Tue, 18 Oct 2022 14:50:02 -0500 To: "php internals" Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] RFC [Discussion]: Randomizer Additions From: larry@garfieldtech.com ("Larry Garfield") On Tue, Oct 18, 2022, at 12:22 PM, Tim D=C3=BCsterhus wrote: >>> Generating a random string containing specific characters...thus req= uires multiple lines of code for what effectively is a very simple opera= tion. >>=20 >> Yeah, though those lines of code add distinction and emphasis for is >> meant by character. >>=20 >> In particular, users might be surprised when they give this string >> "abc=F0=9F=98=8B=F0=9F=91=A8=E2=80=8D=F0=9F=91=A9=E2=80=8D=F0=9F=91=A6= "* and get a non-ascii result. > > That's why the method includes 'bytes' in its name. This term is also=20 > used in ->shuffleBytes() which was renamed in=20 > https://wiki.php.net/rfc/random_extension_improvement due to this exac= t=20 > problem. > > In fact ->shuffleBytes() can be considered the companion method to the=20 > proposed ->getBytesFromAlphabet(): "Alphabet" here still, to me, implies a character set, not a byte stream= . Maybe getBytesFromString? getBytesFromList? getBytesFrom() (because= you're getting it "from" the string that's provided, so you don't need = another noun there.)? I'm not opposed to the functionality, but "alphabet" doesn't seem like t= he right word for it. --Larry Garfield