Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:108568 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 16708 invoked from network); 14 Feb 2020 13:26:47 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 14 Feb 2020 13:26:47 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id D644A1804F8 for ; Fri, 14 Feb 2020 03:41:25 -0800 (PST) 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-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.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 ; Fri, 14 Feb 2020 03:41:25 -0800 (PST) Received: by mail-wr1-f41.google.com with SMTP id u6so10586490wrt.0 for ; Fri, 14 Feb 2020 03:41:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=5PwLe2R5AQ8elQjIwud/qH9LHNUa1gCILu57PGV/j4k=; b=YCF+ltzqLOT7pBsE8+/5xiDyNOliRYhJHIa3pn9aJt4v9bWTHdFJBjo8M0RE3rL5Oa lt2lJBxYdQHqYpMVhq1M+kUuFpWtlivIgCXkam+ZPThx2w/aq6/Aoi+dvctC9YG5vNT0 8JjVCFetdhV/fdLWJ+8ichFAr53kem7WWWVOrr6yQr4F+n+zzwETJIkisIP66o4DTXGR uSkgezya9L2nA4JHUeHTJw76CurGFIbpEIXIbr2gzO/W/fqoGkDJ92FZPNjf0NKKFV1/ +Ujtt4nj5lvZlNEAy+eGKSXpXTlokjc/5250K9SUycJ9ypKucKorM1CE0M0RO5Up6kff p6og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=5PwLe2R5AQ8elQjIwud/qH9LHNUa1gCILu57PGV/j4k=; b=R+Hu6xAPkwlqD1GGu9wiofqsSLSgYBmWqPj8PCyxgobMOD2mEcTRvJaDI5qdQuI+H8 zscB5MBnL1nRLpHqVJee4g5JUCXgtv9t7CySL4fhUpUwefOlcg7tOjD9d7cYE1STgWZs eL2ak22r6kjHKbiIwpyPelpIPsGsPCb72RNLMeElFUZQOQ9zmiJpoiVVkrYgvc90la2e OJ+EnX84OzDb5EVQ910BsawFlccblmgOVqrtTyK77J52PlCBEbnUA91MVXwr7MYf5oG8 uH9B9bqmDchu8+QOlvTKOHNNCd9d4uJ1jusbpoGpP98N89irBpQ43rG6WHWrCwt0mwyd 7YiQ== X-Gm-Message-State: APjAAAVl9UH5x+moSNLUnwNj2ArG2JoxFe/PdKM6qCFogdwcz8Wz4UBi jbl0XrWQcxo1MT59bywpcqE= X-Google-Smtp-Source: APXvYqxDX77HRjzMtItG5DNIVDI9l+lOOY6bM/H7FAbbDxjstF4bUM46WCBTGGGMn1l9pFFJw/f6fA== X-Received: by 2002:a5d:4a04:: with SMTP id m4mr3742049wrq.104.1581680482862; Fri, 14 Feb 2020 03:41:22 -0800 (PST) Received: from [192.168.0.63] (84-75-30-51.dclient.hispeed.ch. [84.75.30.51]) by smtp.gmail.com with ESMTPSA id s23sm6859758wra.15.2020.02.14.03.41.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Feb 2020 03:41:21 -0800 (PST) Message-ID: <50962DE8-BD18-42D0-8838-908A3A12D261@gmail.com> Content-Type: multipart/alternative; boundary="Apple-Mail=_6DAB68D8-104D-4837-B930-AAEBA9F2744E" Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.60.0.2.5\)) Date: Fri, 14 Feb 2020 12:41:20 +0100 In-Reply-To: Cc: internals@lists.php.net To: Philipp Tanlak References: X-Mailer: Apple Mail (2.3608.60.0.2.5) Subject: Re: [PHP-DEV] Proposal for a new basic function: str_contains From: claude.pache@gmail.com (Claude Pache) --Apple-Mail=_6DAB68D8-104D-4837-B930-AAEBA9F2744E Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > Le 14 f=C3=A9vr. 2020 =C3=A0 10:17, Philipp Tanlak = a =C3=A9crit : >=20 > Hello PHP Devs, >=20 > I would like to propose the new basic function: str_contains. >=20 > The goal of this proposal is to standardize on a function, to check = weather > or not a string is contained in another string, which has a very = common > use-case in almost every PHP project. > PHP Frameworks like Laravel create helper functions for this behavior > because it is so ubiquitous. Some time ago, an RFC proposing to add str_starts_with() and = str_ends_with() was unfortunately declined: https://wiki.php.net/rfc/add_str_begin_and_end_functions = Therefore, unless several people have changed their mind in the right = direction since few months ago, I am pessimistic about the acceptance of = str_contains(). =E2=80=94Claude --Apple-Mail=_6DAB68D8-104D-4837-B930-AAEBA9F2744E--