Hi

Am 2025-07-01 09:01, schrieb Adam Cable:
Voting just opened on the "str_icontains" RFC.

Please find the following resources:

RFC: https://wiki.php.net/rfc/str_icontains
Discussion: https://externals.io/message/127667
PR: https://github.com/php/php-src/pull/18705

Thank you for your RFC. While I initially said “seems easy enough” in the PR and I also believe that making the function ASCII-only for consistency, I ultimately decided to vote against the RFC.

My main reason is that I do not like how this function is added in a standalone fashion without a bigger picture. As mentioned in the PR, `str_starts_with()` and `str_ends_with()` are obvious companion functions.

And ultimately calling `strtolower()` on both parameters before passing them to `str_contains()` is quite explicit in what it does (and would also resolve the Unicode vs ASCII confusion that others expressed). Alternatively `stripos()` would also work.

Best regards
Tim Düsterhus

Reply via email to