We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
function foo() { function () {}; (function () {}); }
php parser works well
The text was updated successfully, but these errors were encountered:
Same problem with
<?php function () {};
Sorry, something went wrong.
that's specific to PHP 7.4 (a part of new introduced syntax) https://wiki.php.net/rfc/arrow_functions_v2
Commit : php/php-src@f3e5bbe
Definition https://github.com/php/php-src/blob/master/Zend/zend_language_parser.y#L999
inline_function: function returns_ref backup_doc_comment '(' parameter_list ')' lexical_vars return_type backup_fn_flags '{' inner_statement_list '}' backup_fn_flags { $$ = zend_ast_create_decl(ZEND_AST_CLOSURE, $2 | $13, $1, $3, zend_string_init("{closure}", sizeof("{closure}") - 1, 0), $5, $7, $11, $8); CG(extra_fn_flags) = $9; } | fn returns_ref '(' parameter_list ')' return_type backup_doc_comment T_DOUBLE_ARROW backup_fn_flags backup_lex_pos expr backup_fn_flags { $$ = zend_ast_create_decl(ZEND_AST_ARROW_FUNC, $2 | $12, $1, $7, zend_string_init("{closure}", sizeof("{closure}") - 1, 0), $4, NULL, zend_ast_create(ZEND_AST_RETURN, $11), $6); ((zend_ast_decl *) $$)->lex_pos = $10; CG(extra_fn_flags) = $9; } ;
#180 - add a new php74 option + functions w/o name
0c2466f
#180 - fix backward compatibility
87612ff
Yes, in php7.4 we have arrow functions, need fix it
ichiriac
No branches or pull requests
php parser works well
The text was updated successfully, but these errors were encountered: