<?php
class Car {
public $speed = 0;
public static function speedUp(){
$this->speed += 10;
}
}
echo Car::speedUp();
?>各位大神救救这个代码吧,感谢~
class Car {
public static $speed = 0;
public static function speedUp(){
return self::$speed += 10;
}
}
echo Car::speedUp();
,静态方法不能用this-> 静态调用用双冒号
::两个双引号什么意思啊?