Security update for Core, with self-updated composer
[yaffs-website] / vendor / nikic / php-parser / test / code / prettyPrinter / commentsInCommaList.test
diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/commentsInCommaList.test b/vendor/nikic/php-parser/test/code/prettyPrinter/commentsInCommaList.test
new file mode 100644 (file)
index 0000000..d0e42ef
--- /dev/null
@@ -0,0 +1,53 @@
+Comments in arrays and function calls
+-----
+<?php
+
+$arr = [
+    // Foo
+    $foo,
+    // Bar
+    $bar,
+    // Discarded
+];
+[
+    // Foo
+    $foo,
+    ,
+    // Bar
+    $bar,
+] = $arr;
+foo(
+    // Foo
+    $foo,
+    // Bar
+    $bar
+);
+new Foo(
+    // Foo
+    $foo
+);
+-----
+!!php7
+$arr = [
+    // Foo
+    $foo,
+    // Bar
+    $bar,
+];
+[
+    // Foo
+    $foo,
+    ,
+    // Bar
+    $bar,
+] = $arr;
+foo(
+    // Foo
+    $foo,
+    // Bar
+    $bar
+);
+new Foo(
+    // Foo
+    $foo
+);
\ No newline at end of file