5ae4f958e297cea75c3971c0cc718f5bbf54b03f
[yaffs-website] / vendor / nikic / php-parser / test / code / parser / expr / uvs / globalNonSimpleVarError.test
1 Non-simple variables are forbidden in PHP 7
2 -----
3 <?php
4 global $$foo->bar;
5 -----
6 !!php7
7 Syntax error, unexpected T_OBJECT_OPERATOR, expecting ';' from 2:13 to 2:14
8 array(
9     0: Stmt_Global(
10         vars: array(
11             0: Expr_Variable(
12                 name: Expr_Variable(
13                     name: foo
14                 )
15             )
16         )
17     )
18     1: Stmt_Expression(
19         expr: Expr_ConstFetch(
20             name: Name(
21                 parts: array(
22                     0: bar
23                 )
24             )
25         )
26     )
27 )