Skip to content

zend_ast: Print placeholder value when printing ZEND_AST_OP_ARRAY #17405

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

Merged
merged 1 commit into from
Jan 10, 2025

Conversation

TimWolla
Copy link
Member

@TimWolla TimWolla commented Jan 8, 2025

As per the discussion in GH-17120, we are printing a placeholder value only. The commit history of that PR also includes alternative implementations, should a different decision be desirable.

Fixes GH-17096
Closes GH-17120

As per the discussion in phpGH-17120, we are printing a placeholder value only.
The commit history of that PR also includes alternative implementations, should
a different decision be desirable.

Fixes phpGH-17096
Closes phpGH-17120
@@ -1885,6 +1885,11 @@ static ZEND_COLD void zend_ast_export_ex(smart_str *str, zend_ast *ast, int prio
smart_str_appendl(str, ZSTR_VAL(name), ZSTR_LEN(name));
break;
}
case ZEND_AST_OP_ARRAY:
smart_str_appends(str, "Closure(");
Copy link
Member

Choose a reason for hiding this comment

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

The format looks a bit non-standard, but I don't have a better suggestion.

@TimWolla TimWolla merged commit d8d1cb4 into php:master Jan 10, 2025
10 checks passed
@TimWolla TimWolla deleted the ast-op-array-print-crash branch January 10, 2025 07:37
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.

SIGABRT/SIGTRAP when using closures in attributes in PHP 8.5
2 participants