-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Create str_icontains PHP function #18705
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
As a PHP developer of 20 years I'm somewhat accustomed to adding "i" into the function name when I'm after a case-insensitive version. Therefore, I found it a bit odd I couldn't do it with the new "str_contains" function, so have added a case-insensitive version. Tests added too.
Hi, welcome. On first glance code seems good. |
Oh BTW, the CI is failing because you didn't regenerate the arginfo files (or it was, but you didn't add it to your commit). |
Thank you - really appreciate that 👍 |
It appears simple and obvious enough to be okay without RFC (not much discussion to be had here), but I'm okay with this going through the RFC process. Should we also add |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implementation + tests LGTM.
Considering there is going to be bikeshed, and I don't remember why the last time this was not included, I do think an RFC is probably necessary.
Bikeshed: surely |
Already some history posted on the ML, and they're questioning the feature: https://externals.io/message/127504#127505 |
Thanks all :) |
Because |
Thanks all. I'll create a RFC for this, and if successful look to do the same with str_starts_with and str_ends_with :) |
As a PHP developer of 20 years I'm somewhat accustomed to adding "i" into the function name when I'm after a case-insensitive version. Therefore, I found it a bit odd I couldn't do it with the new "str_contains" function, so have added a case-insensitive version. Tests added too.
Assume this would need a RFC to be accepted.