Skip to content
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

Fix IN_ARRAY optimization #18066

Closed
wants to merge 3 commits into from
Closed

Fix IN_ARRAY optimization #18066

wants to merge 3 commits into from

Conversation

iluuu1994
Copy link
Member

@iluuu1994 iluuu1994 commented Mar 14, 2025

in_array() calls are compiled to frameless calls since PHP 8.4. Adjust the optimization appropriately. Luckily, frameless opcodes simplify the optimization quite a bit.

Fixes GH-18050

I'm not sure if this should land on master? Technically a bug, but the fix is not risk-free.

@iluuu1994 iluuu1994 force-pushed the gh-18050 branch 3 times, most recently from 6e15a49 to dba894d Compare March 14, 2025 13:58
@iluuu1994 iluuu1994 requested a review from nielsdos March 14, 2025 14:13
@iluuu1994 iluuu1994 marked this pull request as ready for review March 16, 2025 13:28
@iluuu1994 iluuu1994 requested a review from dstogov as a code owner March 16, 2025 13:28
Copy link
Member

@nielsdos nielsdos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks right, please see my question to double check

Copy link
Member

@nielsdos nielsdos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leaving target branch decision for other people

Copy link
Member

@dstogov dstogov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see problems. I think this may be merged into PHP-8.4.

in_array() calls are compiled to frameless calls. Adjust the
optimization appropriately. Luckily, frameless opcodes simplify the
optimization quite a bit.

Fixes phpGH-18050
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants