Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:95109 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 23309 invoked from network); 13 Aug 2016 08:35:11 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Aug 2016 08:35:11 -0000 Authentication-Results: pb1.pair.com header.from=simon@simon.geek.nz; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=simon@simon.geek.nz; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain simon.geek.nz designates 128.199.154.101 as permitted sender) X-PHP-List-Original-Sender: simon@simon.geek.nz X-Host-Fingerprint: 128.199.154.101 3.91carriage.com Received: from [128.199.154.101] ([128.199.154.101:34477] helo=mail.91carriage.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 55/57-55605-ABBDEA75 for ; Sat, 13 Aug 2016 04:35:09 -0400 Received: from [10.1.1.8] (unknown [180.200.147.155]) by mail.91carriage.com (Postfix) with ESMTPSA id 3CEFB120264; Sat, 13 Aug 2016 08:35:01 +0000 (UTC) Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_1397A841-3F6F-407A-B5FA-659AE40B732B"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail In-Reply-To: <8442f1fa5544b2ca03e7cebbc64e8e5c@wkhudgins.info> Date: Sat, 13 Aug 2016 18:34:48 +1000 Cc: internals@lists.php.net Message-ID: References: <8442f1fa5544b2ca03e7cebbc64e8e5c@wkhudgins.info> To: will@wkhudgins.info X-Mailer: Apple Mail (2.3124) Subject: Re: [PHP-DEV] RFC Posted for str_begins and str_ends functions From: simon@simon.geek.nz (Simon Welsh) --Apple-Mail=_1397A841-3F6F-407A-B5FA-659AE40B732B Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On 2/08/2016, at 8:52 AM, will@wkhudgins.info wrote: >=20 > Hello, >=20 > I recently emailed the group about submitting an RFC for str_begins() = and str_ends() functions. The RFC has now been officially submitted and = is viewable at: >=20 > https://wiki.php.net/rfc/add_str_begin_and_end_functions >=20 > The github PR may be found at: >=20 > https://github.com/php/php-src/pull/2049 >=20 > Hope to be hearing about this, >=20 > Will Firstly, the argument ordering is the wrong way round for a string = function. String functions =E2=80=94 especially search-related ones =E2=80= =94 are haystack, needle (see strpos, strstr, strcspn, strpbrk, etc). Secondly, I feel like this RFC does need to include that it=E2=80=99s a = BC break by introducing new global functions. A quick search shows that = SugarCRM[1] already implements str_begin and str_end functions and = there=E2=80=99s likely to be other projects that do too. [1]: = https://github.com/sugarcrm/sugarcrm_dev/blob/ae189cfa4ed4edd6a4e1e0d9d1d5= ec66f46a0b74/include/utils.php#L2082-L2090 -- Simon Welsh --Apple-Mail=_1397A841-3F6F-407A-B5FA-659AE40B732B Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJXrtuuAAoJEPbD7ZRQAm4ay+8P/RyCI+E8MHrLthLbOXYgkAzC 98oo8+Uin7uSy7krWPRY7tvBMzqdjHBllyC++a5BOUpVhZhQ3CVFOlnHkUiC3j/4 Y1hzv1T/Y/1qDbbrY2SkYsaQBekKqMUThwXG3CSBchxUGbcuTK7ednoWY754aefn /5dtW8XvLGp6Cj1K8b0vEt6XugxB1nmmyaSiFFGUtkZDjzaZfVa0TydafLY9HHIw GlUi64vkXqn1S3/jBOFSij1vHDzOdLpxlW3SpSaoC9n7PtnBE05+hqlqsjPfPuIN Od9HVkBbTDx75gl9/W/F0gidy6yKPXvDWIypD7hPaO+nt/+buAVvRkZkYxSYCw/H QJu4j9WEcwRNQXBo+F6Na3/witMrNNIVawqXDKTCLVitmrKrHm8ZLJlxGQr+pKFc f/zA70NeJns21jHm6sgHMVChL7KJ2hB09WUuZ6jm9i43Ss4qMU0vJ9i+Dy/11x6M r9uzT7j7YmSXIDQC1eMKklajj+JUHiW4cRoYbKtpUZxwKF/TYezCz+UColjF/3OL WRBYJnBX8tprNllRhwZ2VkVUe+xhy44EMftGjGsCPcSQt4UST0RU5qYqjnAMzUiD fU3IgITtMGRQ7wXpoWp0Vc+i9Ac3IVMeaPetr4kLIKvAO+oHic+Uu8Yfw2KxqI9n Uwa24J4JU+UbP3wf1u31 =8yp4 -----END PGP SIGNATURE----- --Apple-Mail=_1397A841-3F6F-407A-B5FA-659AE40B732B--