Re: [RFC] [Discussion] Prefix and Suffix Functions
| From: | mickmackusa | Date: | Sat, 07 Feb 2026 00:11:14 +0000 |
| Subject: | Re: [RFC] [Discussion] Prefix and Suffix Functions | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-130045@lists.php.net to get a copy of this message | ||
While I am not a voting member of the community, I am unconvinced that
there is a sufficient appetite from the PHP community for this new family
of string functions.
I mean, when I discussed the possibility of array_transpose(), I could list
nearly 100 Stack Overflow pages that called for such a function (without
all the potential bugs involved with spreading techniques).
https://meta.stackoverflow.com/q/417663/2943403
Do you see many calls for your proposed functions in the wild? Are there 5
questions on Stack Overflow where these functions provide a resounding
benefit? I've hunted a little and haven't found any, but I might be
searching poorly. Are there pre-existing implementations in repos that we
can observe?
In the absence of real demand, perhaps these should merely be in a userland
library.
I also agree that the $subject should be the first parameter, like
substr_replace().
Mick