为什么会有Warning错误

学习 时间:2026-10-13 06:36:51 阅读:6358
为什么会有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-10-13 06:36:51

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

最新回答共有2条回答

  • 斯文的心情
    回复
    2026-10-13 06:36:51

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

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

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