drupal-civicrm/vendor/nikic/php-parser/test/code/parser/expr/variable.test
2018-01-14 13:10:16 +00:00

56 lines
885 B
Plaintext

Variable syntaxes
-----
<?php
$a;
${'a'};
${foo()};
$$a;
$$$a;
$$a['b'];
-----
!!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(
name: a
)
)
4: Expr_Variable(
name: Expr_Variable(
name: Expr_Variable(
name: a
)
)
)
5: Expr_Variable(
name: Expr_ArrayDimFetch(
var: Expr_Variable(
name: a
)
dim: Scalar_String(
value: b
)
)
)
)