php-parser/test/code/parser/expr/closure_use_trailing_comma.test
Tomas Votruba 4c22c62783
[PHP 8.0] Add attributes support (#661)
Adds support for PHP 8 attributes, represented using `AttrGroup` nodes
containing `Attribute` nodes. The `attrGroup` subnode is added to all
nodes that can have attributes.

This is still missing FPPP support.

Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
2020-09-13 21:01:17 +02:00

29 lines
578 B
Plaintext

Trailing comma in use list
-----
<?php
function() use($a,) {};
-----
!!php7
array(
0: Stmt_Expression(
expr: Expr_Closure(
attrGroups: array(
)
static: false
byRef: false
params: array(
)
uses: array(
0: Expr_ClosureUse(
var: Expr_Variable(
name: a
)
byRef: false
)
)
returnType: null
stmts: array(
)
)
)
)