class Car {
function __construct() {
print "父类构造函数被调用\n";
}
}
class Truck extends Car {
function __construct() {
print "子类构造函数被调用\n";
parent::__construct();
}
}
$car = new Truck();
- 2 回答
- 0 关注
- 1493 浏览
添加回答
举报
0/150
提交
取消