1
0
mirror of https://github.com/danog/PHP-Parser.git synced 2024-12-06 05:48:54 +01:00
PHP-Parser/test/code/parser/expr/fetchAndCall/namedArgs.test
Nikita Popov 98f7f39d1c Add named argument support
Not adding any explicit FPPP support, as I don't think add/remove
of names can be handled any better than full reformatting.
2020-08-09 17:37:44 +02:00

61 lines
1.4 KiB
Plaintext

Named arguments
-----
<?php
foo(a: $b, c: $d);
bar(class: 0);
-----
!!php7
array(
0: Stmt_Expression(
expr: Expr_FuncCall(
name: Name(
parts: array(
0: foo
)
)
args: array(
0: Arg(
name: Identifier(
name: a
)
value: Expr_Variable(
name: b
)
byRef: false
unpack: false
)
1: Arg(
name: Identifier(
name: c
)
value: Expr_Variable(
name: d
)
byRef: false
unpack: false
)
)
)
)
1: Stmt_Expression(
expr: Expr_FuncCall(
name: Name(
parts: array(
0: bar
)
)
args: array(
0: Arg(
name: Identifier(
name: class
)
value: Scalar_LNumber(
value: 0
)
byRef: false
unpack: false
)
)
)
)
)