mirror of
https://github.com/phabelio/PHP-Parser.git
synced 2024-12-14 18:16:06 +01:00
101 lines
1.7 KiB
Plaintext
101 lines
1.7 KiB
Plaintext
|
Function calls
|
||
|
-----
|
||
|
<?php
|
||
|
|
||
|
// function name variations
|
||
|
a();
|
||
|
$a();
|
||
|
${'a'}();
|
||
|
$$a();
|
||
|
$$$a();
|
||
|
$a['b']();
|
||
|
$a{'b'}();
|
||
|
|
||
|
// array dereferencing
|
||
|
a()['b'];
|
||
|
-----
|
||
|
array(
|
||
|
0: Expr_FuncCall(
|
||
|
name: Name(
|
||
|
parts: array(
|
||
|
0: a
|
||
|
)
|
||
|
)
|
||
|
args: array(
|
||
|
)
|
||
|
)
|
||
|
1: Expr_FuncCall(
|
||
|
name: Expr_Variable(
|
||
|
name: a
|
||
|
)
|
||
|
args: array(
|
||
|
)
|
||
|
)
|
||
|
2: Expr_FuncCall(
|
||
|
name: Expr_Variable(
|
||
|
name: Scalar_String(
|
||
|
value: a
|
||
|
)
|
||
|
)
|
||
|
args: array(
|
||
|
)
|
||
|
)
|
||
|
3: Expr_FuncCall(
|
||
|
name: Expr_Variable(
|
||
|
name: Expr_Variable(
|
||
|
name: a
|
||
|
)
|
||
|
)
|
||
|
args: array(
|
||
|
)
|
||
|
)
|
||
|
4: Expr_FuncCall(
|
||
|
name: Expr_Variable(
|
||
|
name: Expr_Variable(
|
||
|
name: Expr_Variable(
|
||
|
name: a
|
||
|
)
|
||
|
)
|
||
|
)
|
||
|
args: array(
|
||
|
)
|
||
|
)
|
||
|
5: Expr_FuncCall(
|
||
|
name: Expr_ArrayDimFetch(
|
||
|
var: Expr_Variable(
|
||
|
name: a
|
||
|
)
|
||
|
dim: Scalar_String(
|
||
|
value: b
|
||
|
)
|
||
|
)
|
||
|
args: array(
|
||
|
)
|
||
|
)
|
||
|
6: Expr_FuncCall(
|
||
|
name: Expr_ArrayDimFetch(
|
||
|
var: Expr_Variable(
|
||
|
name: a
|
||
|
)
|
||
|
dim: Scalar_String(
|
||
|
value: b
|
||
|
)
|
||
|
)
|
||
|
args: array(
|
||
|
)
|
||
|
)
|
||
|
7: Expr_ArrayDimFetch(
|
||
|
var: Expr_FuncCall(
|
||
|
name: Name(
|
||
|
parts: array(
|
||
|
0: a
|
||
|
)
|
||
|
)
|
||
|
args: array(
|
||
|
)
|
||
|
)
|
||
|
dim: Scalar_String(
|
||
|
value: b
|
||
|
)
|
||
|
)
|
||
|
)
|