为什么$car = new Car();这行会报错?
<?php
class Car {
public $speed = 10;
//在这里使用重载实现speedDown方法
public function __call($name, $args) {
if ($name == 'speedDown') {
$this->speed -=10;
}
}
$car = new Car();
$car->speedDown(); //调用不存在的speedDown方法
echo $car->speed;