1--TEST--
2Inconsistencies when accessing protected members - is_callable
3--FILE--
4<?php
5
6class A {
7    static protected function ma() {
8        return 'A::ma()';
9    }
10
11    static private function mp() {
12        return 'A::mp()';
13    }
14}
15
16class B1 extends A {
17    static protected function ma() {
18        return 'B1::ma()';
19    }
20
21    static protected function mp() {
22        return 'B1::mp()';
23    }
24
25    static protected function mb() {
26        return 'B1::mb()';
27    }
28}
29
30class B2 extends A {
31    static public function test() {
32        var_dump(is_callable('A::ma'));
33        var_dump(is_callable('A::mp'));
34        var_dump(is_callable('B1::ma')); // protected method defined also in A
35        var_dump(is_callable('B1::mp')); // protected method defined also in A but as private
36        var_dump(is_callable('B1::mb'));
37    }
38}
39
40var_dump(is_callable('B2::ma'));
41var_dump(is_callable('B2::mp'));
42var_dump(is_callable('B2::mb'));
43var_dump(is_callable('B2::test'));
44echo '----' . "\n";
45B2::test();
46
47?>
48--EXPECT--
49bool(false)
50bool(false)
51bool(false)
52bool(true)
53----
54bool(true)
55bool(false)
56bool(true)
57bool(false)
58bool(false)
59