答案之中的答案
speed; } protected function speedUp() { $this->speed += 10; } public function start(){ $this->speedUp(); } } $car = new Car(); $car->start(); echo $car->getSpeed();
speed; } protected function speedUp() { $this->speed += 10; } public function start(){ $this->speedUp(); } } $car = new Car(); $car->start(); echo $car->getSpeed();
2015-05-30
举报