php-parser/test/code/parser/expr/uvs/globalNonSimpleVarError.test

27 lines
542 B
Plaintext
Raw Normal View History

2015-06-13 15:42:09 +02:00
Non-simple variables are forbidden in PHP 7
-----
<?php
global $$foo->bar;
-----
!!php7
Syntax error, unexpected T_OBJECT_OPERATOR, expecting ';' from 2:13 to 2:14
2015-06-13 15:42:09 +02:00
array(
0: Stmt_Global(
vars: array(
0: Expr_Variable(
name: Expr_Variable(
name: foo
)
)
)
)
1: Stmt_Expression(
2017-01-19 22:25:22 +01:00
expr: Expr_ConstFetch(
name: Name(
parts: array(
0: bar
)
2015-06-13 15:42:09 +02:00
)
)
)
2017-01-19 22:25:22 +01:00
)