Security update for Core, with self-updated composer
[yaffs-website] / vendor / nikic / php-parser / test / code / prettyPrinter / expr / closure.test
diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/expr/closure.test b/vendor/nikic/php-parser/test/code/prettyPrinter/expr/closure.test
new file mode 100644 (file)
index 0000000..7e4fcfd
--- /dev/null
@@ -0,0 +1,18 @@
+Closures
+-----
+<?php
+
+$closureWithArgs = function ($arg1, $arg2) {
+    $comment = 'closure body';
+};
+
+$closureWithArgsAndVars = function ($arg1, $arg2) use($var1, $var2) {
+    $comment = 'closure body';
+};
+-----
+$closureWithArgs = function ($arg1, $arg2) {
+    $comment = 'closure body';
+};
+$closureWithArgsAndVars = function ($arg1, $arg2) use($var1, $var2) {
+    $comment = 'closure body';
+};
\ No newline at end of file