Re: [RFC] [Discussion] Prefix and Suffix Functions

From: Date: Fri, 06 Feb 2026 23:34:58 +0000
Subject: Re: [RFC] [Discussion] Prefix and Suffix Functions
References: 1 2 3 4 5 6 7  Groups: php.internals 
Request: Send a blank email to internals+get-130042@lists.php.net to get a copy of this message
On 2/6/26 03:51, Ilija Tovilo wrote:
Hi Carlos On Fri, Feb 6, 2026 at 10:41 AM Barel <barel.barelon@gmail.com> wrote:
It's been 14 days since the last change to the RFC and there have been no further discussions, so the cooldown period is over and I would like to announce the start of the voting Link to the RFC for reference: https://wiki.php.net/rfc/prefix_suffix_functions
Sorry for my late feedback. What's the rationale for $subject being the last parameter only in str_prefix_replace() and str_suffix_replace()? I feel pretty strongly that the subject should always be the first parameter. We don't want to add to the classic haystack/needle confusion. Regards, Ilija
I agree with Ilija that the subject should always be the first parameter. I'm not necessarily against adding these functions to the language, but they seem ripe for a well-adopted userland library. As such, I'm on the fence about whether these belong in core. Cheers, Ben

« previous php.internals (#130042) next »