closure_023.phpt 227 B

12345678910111213
  1. --TEST--
  2. Closure 023: Closure declared in statically called method
  3. --FILE--
  4. <?php
  5. class foo {
  6. public static function bar() {
  7. $func = function() { echo "Done"; };
  8. $func();
  9. }
  10. }
  11. foo::bar();
  12. --EXPECT--
  13. Done