Skip to content

zend_ast: Fix AST export of by-reference property hooks - #25069

Open
jorgsowa wants to merge 1 commit into
php:PHP-8.4from
jorgsowa:fix-hook-by-ref-ast-export
Open

jorgsowa wants to merge 1 commit into
php:PHP-8.4from
jorgsowa:fix-hook-by-ref-ast-export

Conversation

@jorgsowa

Copy link
Copy Markdown
Contributor

ZEND_ACC_RETURN_REFERENCE shares a bit with ZEND_ACC_PRIVATE_SET, so &get was exported as private(set) get.

ZEND_ACC_RETURN_REFERENCE shares a bit with ZEND_ACC_PRIVATE_SET, so &get
was exported as private(set) get.
@jorgsowa jorgsowa self-assigned this Oct 30, 2026
Comment thread Zend/zend_ast.c

for (uint32_t i = 0; i < hook_list->children; i++) {
zend_ast_decl *hook = (zend_ast_decl *)hook_list->child[i];
zend_ast_export_visibility(str, hook->flags, ZEND_MODIFIER_TARGET_PROPERTY);

@jorgsowa jorgsowa Oct 30, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Property hooks cannot declare visibility in source

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.

1 participant