Files
PHP-Parser/test/code/parser/expr/fetchAndCall/args.test
Nikita Popov 23647573e8 Represent names using string rather than array of parts
In most circumstances we are interested in the whole string, not
the parts split by namespace separator. As names are common, this
representation measurably improves memory usage and performance.
2023-05-21 21:25:49 +02:00

106 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(
name: f
)
args: array(
)
)
)
1: Stmt_Expression(
expr: Expr_FuncCall(
name: Name(
name: f
)
args: array(
0: Arg(
name: null
value: Expr_Variable(
name: a
)
byRef: false
unpack: false
)
)
)
)
2: Stmt_Expression(
expr: Expr_FuncCall(
name: Name(
name: f
)
args: array(
0: Arg(
name: null
value: Expr_Variable(
name: a
)
byRef: false
unpack: false
)
1: Arg(
name: null
value: Expr_Variable(
name: b
)
byRef: false
unpack: false
)
)
)
)
3: Stmt_Expression(
expr: Expr_FuncCall(
name: Name(
name: f
)
args: array(
0: Arg(
name: null
value: Expr_Variable(
name: a
)
byRef: true
unpack: false
)
)
)
)
4: Stmt_Expression(
expr: Expr_FuncCall(
name: Name(
name: f
)
args: array(
0: Arg(
name: null
value: Expr_Variable(
name: a
)
byRef: false
unpack: false
)
1: Arg(
name: null
value: Expr_Variable(
name: b
)
byRef: false
unpack: true
)
)
)
)
)