Security update for Core, with self-updated composer
[yaffs-website] / vendor / nikic / php-parser / test / code / parser / stmt / function / conditional.test
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/function/conditional.test b/vendor/nikic/php-parser/test/code/parser/stmt/function/conditional.test
new file mode 100644 (file)
index 0000000..d9c886e
--- /dev/null
@@ -0,0 +1,33 @@
+Conditional function definition
+-----
+<?php
+
+if (true) {
+    function A() {}
+}
+-----
+array(
+    0: Stmt_If(
+        cond: Expr_ConstFetch(
+            name: Name(
+                parts: array(
+                    0: true
+                )
+            )
+        )
+        stmts: array(
+            0: Stmt_Function(
+                byRef: false
+                name: A
+                params: array(
+                )
+                returnType: null
+                stmts: array(
+                )
+            )
+        )
+        elseifs: array(
+        )
+        else: null
+    )
+)