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