Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:108742 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 93366 invoked from network); 24 Feb 2020 21:53:28 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 24 Feb 2020 21:53:28 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 5ADD6180210 for ; Mon, 24 Feb 2020 12:10:42 -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.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS11403 66.111.4.0/24 X-Spam-Virus: No X-Envelope-From: Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 24 Feb 2020 12:10:41 -0800 (PST) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 1274F21AB4 for ; Mon, 24 Feb 2020 15:10:41 -0500 (EST) Received: from imap26 ([10.202.2.76]) by compute7.internal (MEProxy); Mon, 24 Feb 2020 15:10:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=4Ocezxm/c6YrwvIBLsCbFCG3Jg85pRnlT16s5Wxk5 /c=; b=XmFHu2zxSavBSJLa6lVgklAEnnUvWw/+nnsj1Nm+azUIlTk/UJXgrwZAV au0cgWoIztQVcFEkOQWoRm7bcGTPJ0hvtX4CFWGYr5BgmXYzqncOJiVf+buuM38r KHdawtCilRB2fiOqqq7hh0+RRdbX29p5x/3Ax1RL3EGDTkymQYfYt8OkaNrzHRdO PNCI5LCRtaUzFg0zyLwiaOlb3hm2Q/ML4x/SD5rkG+8MaPtU2uwdNkhu5a2n4cyl LaTpZ2Ma7+8DxqtePYKX3yTuFL4kICUXM1+Gp71U8XmEa2c8hWWcCG63AYxHtVkD 2p6n22gikn6sDBh9EboavRmnx0hOQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrledtgddufeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgfgsehtqhertderreejnecuhfhrohhmpedfnfgr rhhrhicuifgrrhhfihgvlhgufdcuoehlrghrrhihsehgrghrfhhivghlughtvggthhdrtg homheqnecuffhomhgrihhnpehphhhprdhnvghtnecuvehluhhsthgvrhfuihiivgeptden ucfrrghrrghmpehmrghilhhfrhhomheplhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrd gtohhm X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 77FC314200A2; Mon, 24 Feb 2020 15:10:40 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.1.7-947-gbed3ff6-fmstable-20200220v2 Mime-Version: 1.0 Message-ID: In-Reply-To: <72DB7A36-CB51-4901-AF63-6B0B46664C44@benramsey.com> References: <72DB7A36-CB51-4901-AF63-6B0B46664C44@benramsey.com> Date: Mon, 24 Feb 2020 14:10:20 -0600 To: "php internals" Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [RFC] [DISCUSSION] str_contains From: larry@garfieldtech.com ("Larry Garfield") On Mon, Feb 24, 2020, at 10:56 AM, Ben Ramsey wrote: > > On Feb 24, 2020, at 10:52, Philipp Tanlak = wrote: > >=20 > >> Ben Ramsey schrieb am Mo. 24. Feb. 2020 um 17:2= 1: > >> > On Feb 23, 2020, at 03:12, Philipp Tanlak wrote: > >> > > >> > Hey PHP Devs! > >> > > >> > Since the RFC to str_contains is now almost a week old and most o= f the > >> > discussion happened in the initial discussion/proposal thread, I = wasn't > >> > sure if everyone has seen it. Therefore I'd like to create this n= ew email > >> > thread with the correct label for RFC discussions, before we open= up the > >> > RFC for voting in approximately a week from now. > >> > > >> > If there is any feedback or something you'd like to discuss, feel= free to > >> > leave it here. > >> > > >> > Link to RFC: https://wiki.php.net/rfc/str_contains > >> > > >> > Regards > >> > Philipp > >>=20 > >>=20 > >> Just so I=E2=80=99m clear on the functionality here, is this essent= ially the same behavior as the following? > >>=20 > >>=20 > >> strpos($haystack, $needle) !=3D=3D false > >>=20 > >>=20 > >> And the purpose is primarily for a better developer experience by r= educing confusion through providing a dedicated function for this behavi= or? > >=20 > > Yes, this is correct. >=20 >=20 > As an effort to improve developer experience, I=E2=80=99m on board wit= h this. I=20 > think it make sense to add this. >=20 > Cheers, > Ben I fully support this as well. It's a common source of subtle bugs, and = a minor change to the standard library can eliminate a major PHP WTF. --Larry Garfield