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/variable.test

56 lines
885 B
Plaintext
Raw Normal View History

Variable syntaxes
-----
<?php
$a;
${'a'};
${foo()};
2011-12-07 18:17:05 +01:00
$$a;
$$$a;
$$a['b'];
-----
2015-06-13 14:59:24 +02:00
!!php5
array(
0: Expr_Variable(
name: a
)
1: Expr_Variable(
name: Scalar_String(
value: a
)
)
2: Expr_Variable(
name: Expr_FuncCall(
name: Name(
parts: array(
0: foo
)
)
args: array(
)
)
)
3: Expr_Variable(
name: Expr_Variable(
2011-12-07 18:17:05 +01:00
name: a
)
)
4: Expr_Variable(
name: Expr_Variable(
name: Expr_Variable(
2011-12-07 18:17:05 +01:00
name: a
)
)
)
5: Expr_Variable(
name: Expr_ArrayDimFetch(
var: Expr_Variable(
name: a
)
dim: Scalar_String(
value: b
)
)
)
2015-06-13 14:59:24 +02:00
)