Re: [RFC] str_icontains
| From: | Larry Garfield | Date: | Mon, 23 Jun 2025 23:18:43 +0000 |
| Subject: | Re: [RFC] str_icontains | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-127740@lists.php.net to get a copy of this message | ||
On Sun, Jun 15, 2025, at 3:12 PM, Adam Cable wrote:
> Hello internals,
>
> I'd like to present my first RFC - str_icontains, a case-insensitive
> friend of str_contains
>
> RFC: https://wiki.php.net/rfc/str_icontains
> PR (including tests): https://github.com/php/php-src/pull/18705
>
> Previous discussion: https://externals.io/message/127504
>
> Thanks,
> Adam
When str_contains() was added, a case-insensitive version was deliberately omitted in favor of
"just use strtolower() yourself." Have you gone back to see the arguments for that to
determine if they're still relevant?
(I don't recall the details; I think one of them was function count explosion, but I think
there were more.)
--Larry Garfield