Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:109325 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 56174 invoked from network); 26 Mar 2020 10:29:12 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 26 Mar 2020 10:29:12 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id D554C1801FD for ; Thu, 26 Mar 2020 01:54:04 -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_H2,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-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41]) (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 ; Thu, 26 Mar 2020 01:54:04 -0700 (PDT) Received: by mail-lf1-f41.google.com with SMTP id j188so4107826lfj.11 for ; Thu, 26 Mar 2020 01:54:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=V3aOvCFvrPIyTtuSI8868aNWLHNTuvJ6ovcL4yE3ZtU=; b=htMjuQa3fcito8v/5GD0FWWgWzl/YjiSDFbKJYxNanaxncy0tpOj+OQI/qDqj6wAOD 8wojgQGbcC2qn0dxofeOkiBtssBkls0E87T8PNTOxTiiaWeSKTV+cIr1bIuSCH4Jucyz DlRlPtVi8/T8dK190ItZjYoTJvfzgC1GhKj1B9vEAOlew90fXwAyTlNd2/un+BEq57ig UcN1Ewk6kAih1e1WdV51DsA84zcAMPfUZnOIa/HcexBhfnYdhjzsrjKgkh+rikmAp1D/ UjEXGDcai1Q7SHgjLTAyji6NOl0TNjiKF84mANC58ugVM1sQd/goV0Uts/49ggpF+G5m fOGw== 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:cc; bh=V3aOvCFvrPIyTtuSI8868aNWLHNTuvJ6ovcL4yE3ZtU=; b=ppp9oaftLtCMbKFWVIJsDYn706IrtQvJWK9ACaUclD8jb2Z9zCMXcLGJHxNqVPn6WS hmu5JpQeYoDIwsLxqvXGOLWywQOynm97NJXHLcIQqkZ4UYvWCzXafq3mEsdfnEAAZItA zVqisox8HAd4ZcjY2dRRgdkPcHnk4okPTa6bbMAnCko6ZzuZSQORVE0KzSIS0INV9W3q LVY9utT1bW7YVuqpszjkRPx2Tu274PNbZ90HbzNvOp4bkN/cXq9j1X6DDeqzczGKf3cq LU1ajdKDv2CVf91SqU2GXANL87TLoLrU4VKzZ5Mo89HhwIRvdyZzZzNWvR69JXULp4gb 5yoQ== X-Gm-Message-State: ANhLgQ2hFSAt21wA9IIFZIWtY5CmNBkGO35mv+Onn9LKgYcYDj7nep2y pfsVH6bPyKVZUKvz/YaFWG2pzvEmfEjoFAUbowcCg25RlmQ= X-Google-Smtp-Source: ADFU+vtzLLHvZow7LU99p5HhZTTMhbPLZrQ3531BDJa24FUG8FdDd7jW48Xp7biAiQAGUK8qOc1icgSQnkMThJfF0AQ= X-Received: by 2002:ac2:4352:: with SMTP id o18mr5037358lfl.81.1585212840604; Thu, 26 Mar 2020 01:54:00 -0700 (PDT) MIME-Version: 1.0 References: <366565615b320e2f6b0a2d75298d84e7@wkhudgins.info> In-Reply-To: <366565615b320e2f6b0a2d75298d84e7@wkhudgins.info> Date: Thu, 26 Mar 2020 09:53:44 +0100 Message-ID: To: will@wkhudgins.info Cc: PHP internals Content-Type: multipart/alternative; boundary="00000000000041f9f405a1be207f" Subject: Re: [PHP-DEV] RFC Raised for str_starts_with and str_ends_with From: nikita.ppv@gmail.com (Nikita Popov) --00000000000041f9f405a1be207f Content-Type: text/plain; charset="UTF-8" On Thu, Mar 26, 2020 at 3:36 AM wrote: > Hi, > > Hope everyone is doing alright. I just raised a new RFC > (https://wiki.php.net/rfc/add_str_starts_with_and_ends_with_functions , > github patch: https://github.com/php/php-src/pull/5300) for adding > str_starts_with and str_ends_with to PHP. I would like to open this RFC > up to discussion. > > I raised a similar RFC about 9 months ago > (https://wiki.php.net/rfc/add_str_begin_and_end_functions) that was > narrowly rejected. A major criticism of that RFC was the inclusion of > case-insensitive versions of str_starts_with and str_ends_with. I have > incorporated feedback from that experienced and narrowed the new RFC to > only propose str_starts_with and str_ends_with. > I was in favor of the previous RFC, so also in favor of this one :) These are going to complement the recently added str_contains() nicely. Notes on text: > After that RFC was closed, a code freeze was in place for PHP8's release. PHP8 has now been released and several individuals have requested the str_starts_with and str_ends_with functionality again. This is a simple but highly desired functionality for PHP. I think you mean PHP 7.4 here. PHP 8.0 is not yet released, and not in feature freeze either. > Add str_starts_with, and str_starts_with_ci() functions The second function should probably be str_ends_with() :) Nikita --00000000000041f9f405a1be207f--