bug53826.phpt 719 B

123456789101112131415161718192021222324252627282930313233
  1. --TEST--
  2. Bug #53826: __callStatic fired in base class through a parent call if the method is private
  3. --FILE--
  4. <?php
  5. class A1 {
  6. public function __call($method, $args) { echo "__call\n"; }
  7. public static function __callStatic($method, $args) { echo "__callStatic\n"; }
  8. }
  9. class A2 { // A1 with private function test
  10. public function __call($method, $args) { echo "__call\n"; }
  11. public static function __callStatic($method, $args) { echo "__callStatic\n"; }
  12. private function test() {}
  13. }
  14. class B1 extends A1 {
  15. public function test(){ parent::test(); }
  16. }
  17. class B2 extends A2 {
  18. public function test(){ parent::test(); }
  19. }
  20. $test1 = new B1;
  21. $test2 = new B2;
  22. $test1->test();
  23. $test2->test();
  24. ?>
  25. --EXPECT--
  26. __call
  27. __call