1--TEST-- 2Check for inherited old-style constructor. 3--FILE-- 4<?php 5 class A 6 { 7 function A() 8 { 9 echo "In " . __METHOD__ . "\n"; 10 } 11 } 12 13 class B extends A 14 { 15 } 16 17 class C extends B 18 { 19 } 20 21 22 echo "About to construct new B: \n"; 23 $b = new B; 24 25 echo "Is B::B() callable?\n"; 26 var_dump(is_callable(array($b, "B"))); 27 28 echo "Is B::A() callable?\n"; 29 var_dump(is_callable(array($b, "A"))); 30 31 echo "About to construct new C: \n"; 32 $c = new C; 33 34 echo "Is C::A() callable?\n"; 35 var_dump(is_callable(array($c, "A"))); 36 37 echo "Is C::B() callable?\n"; 38 var_dump(is_callable(array($c, "B"))); 39 40 echo "Is C::C() callable?\n"; 41 var_dump(is_callable(array($c, "C"))); 42?> 43--EXPECTF-- 44About to construct new B: 45In A::A 46Is B::B() callable? 47bool(false) 48Is B::A() callable? 49bool(true) 50About to construct new C: 51In A::A 52Is C::A() callable? 53bool(true) 54Is C::B() callable? 55bool(false) 56Is C::C() callable? 57bool(false) 58