Security update for Core, with self-updated composer
[yaffs-website] / vendor / nikic / php-parser / test / code / parser / stmt / haltCompilerOffset.test
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/haltCompilerOffset.test b/vendor/nikic/php-parser/test/code/parser/stmt/haltCompilerOffset.test
new file mode 100644 (file)
index 0000000..6b47548
--- /dev/null
@@ -0,0 +1,34 @@
+Use of __HALT_COMPILER_OFFSET__ constant
+-----
+<?php
+
+var_dump(__HALT_COMPILER_OFFSET__);
+__halt_compiler();
+Foo
+-----
+array(
+    0: Expr_FuncCall(
+        name: Name(
+            parts: array(
+                0: var_dump
+            )
+        )
+        args: array(
+            0: Arg(
+                value: Expr_ConstFetch(
+                    name: Name(
+                        parts: array(
+                            0: __HALT_COMPILER_OFFSET__
+                        )
+                    )
+                )
+                byRef: false
+                unpack: false
+            )
+        )
+    )
+    1: Stmt_HaltCompiler(
+        remaining:
+    Foo
+    )
+)