closure_051.phpt 304 B

1234567891011121314151617181920
  1. --TEST--
  2. Closure 051: static::class in static closure in static method.
  3. --FILE--
  4. <?php
  5. class A {
  6. static function foo() {
  7. $f = static 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"