Skip to content

Fix throwing behaviour with recursive arrays in VM - #24232

Closed
ndossche wants to merge 2 commits into
php:PHP-8.4from
ndossche:fix-vm-kapot
Closed

ndossche wants to merge 2 commits into
php:PHP-8.4from
ndossche:fix-vm-kapot

Conversation

@ndossche

@ndossche ndossche commented Oct 9, 2026

Copy link
Copy Markdown
Member

Behaviour change in 82479e8 overlooked this VM type spec optimization. The JIT had a follow-up already in a0a8624.

Behaviour change in 82479e8 overlooked this VM type spec
optimization. The JIT had a follow-up already in a0a8624.

@iluuu1994 iluuu1994 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks correct to me. FWICT zend_hash_compare() will only recurse if both elements are arrays, so !((op1_info & op2_info) & MAY_BE_ARRAY_OF_ARRAY) looks like the correct condition. Thanks!

@ndossche

ndossche commented Oct 9, 2026

Copy link
Copy Markdown
Member Author

FWICT zend_hash_compare() will only recurse if both elements are arrays, so !((op1_info & op2_info) & MAY_BE_ARRAY_OF_ARRAY) looks like the correct condition. Thanks!

Yes, that's what it says 🙂 ; and indeed that matches the code of zend_hash_compare

@ndossche ndossche closed this in d5a9441 Oct 10, 2026
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.

2 participants