-
Notifications
You must be signed in to change notification settings - Fork 7.7k
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
strtok() fails to tokenize the input when passed a literal string when opcache is enabled #13145
Comments
Hi @TRowbotham! Thanks for the report. This seems to be optimization-related, since |
@iluuu1994 your fix seems incomplete - with The above testcase (still) fails on |
@SjonHortensius I think this commit is only scheduled for 8.3.3. |
thanks - in that case we are experiencing another |
@SjonHortensius It's very likely that these are related. Can you try on 8.3.3? |
Description
The following code:
Resulted in this output:
But I expected this output instead:
The above code results in an infinite loop on PHP 8.3.x and master when opcache is enabled. It works as expected on PHP 8.1.x and 8.2.x with opcache enabled. It also works as expected when opcache is disabled on PHP 8.3.x and master.
If you change the example to use a variable as input instead of a literal string, then it works as expected on PHP 8.3.x and master when opcache is enabled.
PHP Version
PHP 8.3.1
Operating System
Ubuntu 20.04/WSL
The text was updated successfully, but these errors were encountered: