为什么会有Warning错误

学习 时间:2026-04-03 08:55:15 阅读:8713
为什么会有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-04-03 08:55:15

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

最新回答共有2条回答

  • 大方的鸵鸟
    回复
    2026-04-03 08:55:15

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

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

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