Security update for Core, with self-updated composer
[yaffs-website] / vendor / nikic / php-parser / test / code / parser / expr / uvs / globalNonSimpleVarError.test
diff --git a/vendor/nikic/php-parser/test/code/parser/expr/uvs/globalNonSimpleVarError.test b/vendor/nikic/php-parser/test/code/parser/expr/uvs/globalNonSimpleVarError.test
new file mode 100644 (file)
index 0000000..4cd2e68
--- /dev/null
@@ -0,0 +1,25 @@
+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
+array(
+    0: Stmt_Global(
+        vars: array(
+            0: Expr_Variable(
+                name: Expr_Variable(
+                    name: foo
+                )
+            )
+        )
+    )
+    1: Expr_ConstFetch(
+        name: Name(
+            parts: array(
+                0: bar
+            )
+        )
+    )
+)
\ No newline at end of file