closure.test 394 B

123456789101112131415161718
  1. Closures
  2. -----
  3. <?php
  4. $closureWithArgs = function ($arg1, $arg2) {
  5. $comment = 'closure body';
  6. };
  7. $closureWithArgsAndVars = function ($arg1, $arg2) use($var1, $var2) {
  8. $comment = 'closure body';
  9. };
  10. -----
  11. $closureWithArgs = function ($arg1, $arg2) {
  12. $comment = 'closure body';
  13. };
  14. $closureWithArgsAndVars = function ($arg1, $arg2) use($var1, $var2) {
  15. $comment = 'closure body';
  16. };