PHP类继承,有关构造函数
header("Content-Type:text/html;charset=utf-8");<br /><br />class Class1 extends Class2{<br /> public static $a = 'Class1';<br />}<br />class Class2 extends Class3{<br /> public static $a = 'Class2';<br /> public function __construct(){<br /> echo 'Class2';<br /> }<br />}<br />class Class3{<br /> public static $a = 'Class3';<br /> public function __construct(){<br /> echo 'Class3';<br /> }<br />}<br /><br />$obj = new Class1();<br />