Repository navigation
Conversation
The previous commit passes the op_array through zend_convert_type(), which used to call zend_optimizer_get_class_entry() with a NULL op_array. This lets a class hint naming the current class resolve via op_array->scope when that class is unlinked in the script, i.e. it is conditionally declared or its parent is not known at compile time. self/parent are unaffected: they are substituted at compile time wherever the scope is known. The fallback is sound because code executing in scope X implies that X is the class declared under that name.
jorgsowa
force-pushed
the
optimizer/thread-op-array-class-resolution
branch
from
October 16, 2026 21:03
74d5f65 to
e359b00
Compare
Contributor
Author
|
Follow-up commit:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
zend_convert_type()calledzend_optimizer_get_class_entry()with a NULL op_array (marked with a TODO). This threads theop_arraythrough, so a class hint that names the current class can resolve viaop_array->scopewhen that class is unlinked in the script: it's conditionally declared, or its parent isn't known at compile time (e.g. it lives in another file).self/parentaren't affected; they're already replaced with real names at compile time wherever the scope is known. The fallback is sound because code running in scope X means X is the class declared under that name.