Re: [VOTE] str_icontains

From: Date: Tue, 01 Jul 2025 08:33:48 +0000
Subject: Re: [VOTE] str_icontains
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-127815@lists.php.net to get a copy of this message
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

« previous php.internals (#127815) next »