-
-
Notifications
You must be signed in to change notification settings - Fork 135
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
Incorrect behaviour of mb_strpos #329
Comments
Related: https://bugs.php.net/bug.php?id=80649. |
Would you mind sending a PR to allow null everywhere on the PHP8 signatures? |
I suggest that we allow null, but we also prepare for this RFC coming to PHP 8.1, making our polyfills trigger a deprecation warning (using |
Hmmm, simply adding |
We cannot know that. |
We could probably work it out using |
@GrahamCampbell I fear that inspecting the debug backtrace and doing file IO for each call to the polyfills would make them unusable from a performance PoV. |
Yeh. I guess this is a no-fix. The current implementation is probably best. |
Well, maybe we should fix that by allowing Code written for strict mode is unlikely to internally catch TypeError triggered by passing |
I feel it's better to be slightly too strict than to be too weak in strict mode. People will ultimately need to fix their code for it to work on PHP 8.1 anyway. |
@GrahamCampbell but here, we make their code break without any deprecation warning, making our polyfill match a PHP 9.0 behavior when running on 7.1. that's not good. |
I agree with @stof |
Will be fixed by #330 |
should print to
bool(false)
and raise no errors (https://3v4l.org/YXq4M), because the mb_ functions all treat null as the empty string, by design.On PHP 8, the symfony polyfill triggers a type error.
The text was updated successfully, but these errors were encountered: