access_modifiers_009.phpt 538 B

1234567891011121314151617181920212223242526
  1. --TEST--
  2. Inconsistencies when accessing protected members - 2
  3. --XFAIL--
  4. Discussion: http://marc.info/?l=php-internals&m=120221184420957&w=2
  5. --FILE--
  6. <?php
  7. class A {
  8. static protected function f() {return 'A::f()';}
  9. }
  10. class B1 extends A {
  11. static protected function f() {return 'B1::f()';}
  12. }
  13. class B2 extends A {
  14. static public function test() {
  15. var_dump(is_callable('B1::f'));
  16. B1::f();
  17. }
  18. }
  19. B2::test();
  20. ?>
  21. --EXPECTF--
  22. bool(false)
  23. Fatal error: Call to protected method B1::f() from scope B2 in %s on line %d