请问 【public function __call($name,$args)】中$name ,$args 在属性上有什么区别?
<?php /*class Car { public $speed = 10; //在这里使用重载实现speedDown方法 } $car = new Car(); $car->speedDown(); //调用不存在的speedDown方法 echo $car->speed;*/ class Car { public $speed = 0; public function __call($name,$args) { if ($name == 'speedUp'){ $this->speed += 10; } } } $car = new Car(); $car->speedUp(); echo $car->speed;