例10.8.使用新标准的构造函数 class BaseClass { function __construct() { print "In BaseClass constructor\n"; } }
class SubClass extends BaseClass { function __construct() { parent::__construct(); print "In SubClass constructor\n"; } } $obj = new BaseClass(); $obj = new SubClass();