1
0
mirror of https://github.com/danog/PHP-Parser.git synced 2024-12-03 17:57:59 +01:00
PHP-Parser/test/code/parser/expr/fetchAndCall/args.test
2017-01-19 22:25:22 +01:00

109 lines
2.3 KiB
Plaintext

Arguments
-----
<?php
f();
f($a);
f($a, $b);
f(&$a);
f($a, ...$b);
-----
array(
0: Stmt_Expression(
expr: Expr_FuncCall(
name: Name(
parts: array(
0: f
)
)
args: array(
)
)
)
1: Stmt_Expression(
expr: Expr_FuncCall(
name: Name(
parts: array(
0: f
)
)
args: array(
0: Arg(
value: Expr_Variable(
name: a
)
byRef: false
unpack: false
)
)
)
)
2: Stmt_Expression(
expr: Expr_FuncCall(
name: Name(
parts: array(
0: f
)
)
args: array(
0: Arg(
value: Expr_Variable(
name: a
)
byRef: false
unpack: false
)
1: Arg(
value: Expr_Variable(
name: b
)
byRef: false
unpack: false
)
)
)
)
3: Stmt_Expression(
expr: Expr_FuncCall(
name: Name(
parts: array(
0: f
)
)
args: array(
0: Arg(
value: Expr_Variable(
name: a
)
byRef: true
unpack: false
)
)
)
)
4: Stmt_Expression(
expr: Expr_FuncCall(
name: Name(
parts: array(
0: f
)
)
args: array(
0: Arg(
value: Expr_Variable(
name: a
)
byRef: false
unpack: false
)
1: Arg(
value: Expr_Variable(
name: b
)
byRef: false
unpack: true
)
)
)
)
)