Skip to content

Conversation

@pull
Copy link

@pull pull bot commented Jan 6, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

RFC: https://wiki.php.net/rfc/partial_function_application_v2

For FCCs, the parser generates a normal function call AST node, the but argument
list is a ZEND_AST_CALLABLE_CONVERT / zend_ast_fcc node.

We extend this for PFAs so that zend_ast_fcc can represent arguments.

 * Support PFA syntax in grammar
 * Update zend_ast_fcc so that arguments can be represented
 * Support serialization of zend_ast_fcc arguments in SHM / file cache
 * Introduce zend_ast_arg_list_add(): Same as zend_ast_list_add(), but wraps the
   list in a ZEND_AST_CALLABLE_CONVERT when adding any placeholder argument.

Technically the arg list wrapping is not required, but it results in simpler
code later as it will be very convenient in the compiler (determines whether a
function calls is a PFA/FCC), and for PFA-in-const-expr support. It also allows
to unify FCCs and PFAs in the grammar.

Closes GH-20717.
@pull pull bot locked and limited conversation to collaborators Jan 6, 2026
@pull pull bot added the ⤵️ pull label Jan 6, 2026
@pull pull bot merged commit 5472cac into turkdevops:master Jan 6, 2026
1 check failed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant