1
0
mirror of https://github.com/danog/PHP-Parser.git synced 2024-12-04 18:28:25 +01:00
PHP-Parser/test/code/parser/expr/fetchAndCall/args.test

109 lines
2.3 KiB
Plaintext
Raw Normal View History

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