为什么会有Warning错误

学习 时间:2026-08-24 17:14:50 阅读:7813
为什么会有Warning错误以下是警告错误信息:我的车Porsche价格是1000000 Warning:Missing argument 1 for MyCar::__construct(),called in PHPDocument1 on line 28 and defined in PHPDocument1 on line 5 Warning:Missing argument 2 for MyCar::__construct(),called in PHPDocument1 on line 28 and defined in PHPDocument1 on line 5 我得新车是奔驰价格是10231000

最佳回答

乐观的香氛

欢喜的糖豆

2026-08-24 17:14:50

class myCarInfo extends MyCar { public $name1="奔驰"; public $price1="10231000"; function __construct(){ } function information() { echo "我得新车是"。$this->name1; echo "价格是"。$this->price1; } } 承继了父类的构造函数吧

最新回答共有2条回答

  • 凶狠的大门
    回复
    2026-08-24 17:14:50

    class myCarInfo extends MyCar { public $name1="奔驰"; public $price1="10231000"; function __construct(){ } function information() { echo "我得新车是"。$this->name1; echo "价格是"。$this->price1; } } 承继了父类的构造函数吧

上一篇 求一句福尔摩斯语录中一句话

下一篇 相对论质量公式推导