lsb_013.phpt 387 B

123456789101112131415161718192021222324
  1. --TEST--
  2. ZE2 Late Static Binding is_callable() and static::method()
  3. --FILE--
  4. <?php
  5. class Test1 {
  6. static function test() {
  7. var_dump(is_callable("static::ok"));
  8. var_dump(is_callable(array("static","ok")));
  9. }
  10. }
  11. class Test2 extends Test1 {
  12. static function ok() {
  13. }
  14. }
  15. Test1::test();
  16. Test2::test();
  17. ?>
  18. --EXPECT--
  19. bool(false)
  20. bool(false)
  21. bool(true)
  22. bool(true)