func_sig_trailing_comma.phpt 510 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. --TEST--
  2. Trailing comma in function signatures
  3. --FILE--
  4. <?php
  5. function test(
  6. $there,
  7. $are,
  8. $many,
  9. $params,
  10. ) {
  11. echo "Foo\n";
  12. }
  13. class Test {
  14. public function method(
  15. $there,
  16. $are,
  17. $many,
  18. $params,
  19. ) {
  20. echo "Foo\n";
  21. }
  22. }
  23. $func = function(
  24. $there,
  25. $are,
  26. $many,
  27. $params,
  28. ) {
  29. echo "Foo\n";
  30. };
  31. $func = fn(
  32. $there,
  33. $shouldnt,
  34. $be,
  35. $many,
  36. $params,
  37. ) => print "Foo\n";
  38. ?>
  39. ===DONE===
  40. --EXPECT--
  41. ===DONE===