Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:108563 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 95847 invoked from network); 14 Feb 2020 11:30:51 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 14 Feb 2020 11:30:51 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id E83471801FD for ; Fri, 14 Feb 2020 01:45:27 -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_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-ot1-f45.google.com (mail-ot1-f45.google.com [209.85.210.45]) (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 01:45:27 -0800 (PST) Received: by mail-ot1-f45.google.com with SMTP id p8so8523678oth.10 for ; Fri, 14 Feb 2020 01:45:27 -0800 (PST) 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=Mkoqs2TeKrI5BR89X/tOmVscetKUL58EugzacrNwZUc=; b=mTXSEeflylXP/sZhvKyGyVayF+pPw2FvDXZHdPL+fwAshLIYl5QTZ2Ob1XNGUL+lPo 0bfX5ENO2kwiwfmhzHHU+yuN1vJDxosSIKX5xs3RJsMwxBPRuxUAF9yQLk6IJqEPhHsD +GZ88mu3s+0iSJN1MN7PBAVlXX2J3CUpcjjQT2GWvJ6cuHbgdVrxm8ZVKOa4ndAHbTqx OYz/lgnBKmGg0Q3fdgjSS2GlnhPXodeOxab75gDyxF3+x2vbUbESaZdfqvzXxvVpwCTW lgP6jdJc1bj/+Up4f+rYVxA6CigL2jUIBL6QkAfuMA7l1vsO0A/Qr6UE2UOVQZWSD5Sj J7bw== 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=Mkoqs2TeKrI5BR89X/tOmVscetKUL58EugzacrNwZUc=; b=cTOawz3DgKDOjURrnqi0Sy6JAwwg1t8SDkdabWTtmaLAhaWS3H3gfI1y8Abmd4ZO8v PJkAasxbBjtu5xGIweYRvB1mT6CdqgRoNuPMHy65c2ON8PbU5RmUVBIlAfcVIYzSrKYs z8n+y3HX81Mbf2OLxWLiyTpq/hycxYTwJFXWrsGzmoo6n1nukbfA08BF+G5DXU7nECk0 ObYw0KFkvisJKSuaU03qJW4IAUJg5Co5uzop5sroGJnAwk0CWvwQWmro2lD7y0dYSNWv nVYgyK4dEidi3U0/EkCxmiSbsbkzPC+egcUDp7Ubr8SraPZesT7rf2/vAbuEOf39P6Oj bGxQ== X-Gm-Message-State: APjAAAWU37pIgR1b2JDwkraYmW2WdKgmLe8A8JPJz3Dq7SiQCkhWaeJ0 8vVf1JgxBJkxfGfTFUW19GTwbCpZ X-Google-Smtp-Source: APXvYqyqhMKOwJe78WabnGpHBLiZRVU9mjf4KsCet6gIgQt5mDmdANwAi5ce3xPSWPXtdxuhgDirrg== X-Received: by 2002:a05:6830:128e:: with SMTP id z14mr1554548otp.184.1581673524928; Fri, 14 Feb 2020 01:45:24 -0800 (PST) Received: from mail-ot1-f51.google.com (mail-ot1-f51.google.com. [209.85.210.51]) by smtp.gmail.com with ESMTPSA id 5sm1802602otr.13.2020.02.14.01.45.24 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 14 Feb 2020 01:45:24 -0800 (PST) Received: by mail-ot1-f51.google.com with SMTP id j20so8583613otq.3 for ; Fri, 14 Feb 2020 01:45:24 -0800 (PST) X-Received: by 2002:a9d:6b06:: with SMTP id g6mr1548113otp.93.1581673523998; Fri, 14 Feb 2020 01:45:23 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Fri, 14 Feb 2020 09:44:48 +0000 X-Gmail-Original-Message-ID: Message-ID: To: Philipp Tanlak Cc: PHP internals Content-Type: multipart/alternative; boundary="0000000000008c86be059e861034" Subject: Re: [PHP-DEV] Proposal for a new basic function: str_contains From: phpmailinglists@gmail.com (Peter Bowyer) --0000000000008c86be059e861034 Content-Type: text/plain; charset="UTF-8" On Fri, 14 Feb 2020 at 09:18, Philipp Tanlak wrote: > I would like to propose the new basic function: str_contains. > > The proposed signature for this function follows the conventions of other > signatures of string functions and should look like this: > > str_contains(string $haystack, string $needle): bool > > What are your opinions on this proposal? > In principle, yes. There are a couple of considerations first, like how you plan to handle case-insensitive matches; and previous discussions for this and the wider context of related string functions: https://externals.io/message/106162 https://externals.io/message/100142 https://externals.io/message/94787 https://wiki.php.net/rfc/add_str_begin_and_end_functions Peter --0000000000008c86be059e861034--