Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:127815 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by lists.php.net (Postfix) with ESMTPS id A1BB61ADA75 for ; Tue, 1 Jul 2025 08:33:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1751358721; bh=Qw55JnJkuAwPeXq7run4qkrc7AJXHGQRqa1x19rgOEs=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=O8uS5X6OeHCk+TwA64Zvx/++Ujb0mgrg0B3Vlzg13tHKcIHwnL/26BZlGVtSFLL+J 9I8SPbi8nley/njk3Q58WPQ9YgN6PAGsVpLHDwj/o4p9iZ4ebnBD+hRiyWU8SQAQds 99/zq+iQ13i58kXl1mgZK7WLdwbZ9nFgg+qoTPXd9LXvy554E086FkEHmi8ZbdIR06 /NpnyTe6iR953GLirnwXCSC9+uDTQUsAcLAioc54TJFhW+upx9X1YfTwZ5xP+vIQ/C 8CdBiacvexFV4+gbRYqXBwHv6T/G+SyyKi2Xepig2v09dulzoLPfqt4Cc1xPEqI1Mm GVdTlCkPKPYFQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 954B918069C for ; Tue, 1 Jul 2025 08:31:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from chrono.xqk7.com (chrono.xqk7.com [176.9.45.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 1 Jul 2025 08:31:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1751358828; bh=YmSSAgdFO6c8sOXvBdTaXxb37OuoLUG3UtUrmrfXcUw=; h=MIME-Version:Date:From:To:Cc:Subject:In-Reply-To:References: Message-ID:Content-Type:from:to:cc:subject:message-id; b=B2LLr11EtyZsCBkcf1jb4MAXgJdOjFTcZP+bkCsieVSuwFimxRc0ioby4JO4akR1c lp99aJCFCW0fQ7A/oHMRWjgmhPv8ngFR8bOvwU0SEUDJXDJaNYKl/CC4sWf8cYm5Wj rhQDMuTbU3xU7BjiCWPE3JLTS1WgdewaPexHuQFJ+bhRiFM8CpKncD6/CrYb+Y0FtR j4ynFliBZBZB1O+jAr24EWTXrHQWk+fEAKsnNbJdgzL7K08k0bdVjiAJuOSzdPV196 3aZ0JZnEe3zzLbOidrexppM8OoFssbk7A2TGIJSTV0iy9a2OJbN5PRHp0RuxZ0ijwA ti+gvK97lOyTg== Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Date: Tue, 01 Jul 2025 10:33:48 +0200 To: Adam Cable Cc: php internals Subject: Re: [PHP-DEV] [VOTE] str_icontains In-Reply-To: References: <0e13771dc08c4a7d880c1fff46d21bf0@bastelstu.be> Message-ID: <93d54094168d4c7ef98eb32336cdc5d0@bastelstu.be> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit From: tim@bastelstu.be (=?UTF-8?Q?Tim_D=C3=BCsterhus?=) Hi Am 2025-07-01 10:17, schrieb Adam Cable: > Thanks for giving an explanation of your vote, thank you. > I had assumed that going with a small RFC for this would be easier than > trying to get str_starts/ends_with through at the same time, as noted > in > the PR: > > "I'll create a RFC for this, and if successful look to do the same with > str_starts_with and str_ends_with" I generally prefer splitting RFCs into its “atomic parts” that make sense on its own, since that makes it easier to discuss the RFC and ensures that features compose well. However in this case, the other functions are *so similar* in practice that it would make sense to handle them all at the same time, including figuring out naming / the bigger picture. Otherwise we might end up with `str_icontains()` and `stri_starts_with()` (since `str_istarts_with()` is ugly by the folks discussing the next RFC) - which clearly is undesirable. Best regards Tim Düsterhus