有個變量不知道什么作用
class Car {
??? public $speed = 0;
???
??? public function __call($name, $args) {
??????? if ($name == 'speedUp') {
??????????? $this->speed += 10;
??????? }
??? }
}
$car = new Car();
$car->speedUp(); //調用不存在的方法會使用重載
echo $car->speed;
這個args有什么用啊
2015-12-16
$args 就是參數(shù)列表 意思就是有參數(shù)或者沒有參數(shù) 明白嗎