一直提示运行成功,输出错误
<?php class Car { public $speed = 0; //增加speedUp方法,使speed加10 public function speedUp(){ $this->speed +=10; } } $car = new Car(); $car->speedUp(); echo $car->speed;
<?php class Car { public $speed = 0; //增加speedUp方法,使speed加10 public function speedUp(){ $this->speed +=10; } } $car = new Car(); $car->speedUp(); echo $car->speed;
2017-09-14
举报