closure_052.phpt 301 B

1234567891011121314151617181920
  1. --TEST--
  2. Closure 052: static::class in non-static closure in static method.
  3. --FILE--
  4. <?php
  5. class A {
  6. static function foo() {
  7. $f = function() {
  8. return static::class;
  9. };
  10. return $f();
  11. }
  12. }
  13. class B extends A {}
  14. var_dump(B::foo());
  15. ?>
  16. --EXPECT--
  17. string(1) "B"