代碼出問(wèn)題了。。。
<?php class?Car?{ ????public?$speed?=?0; ????public?static?function?speedUp(){ ????????$this->speed?+=?10; ????} } echo?Car::speedUp(); ?>
各位大神救救這個(gè)代碼吧,感謝~
<?php class?Car?{ ????public?$speed?=?0; ????public?static?function?speedUp(){ ????????$this->speed?+=?10; ????} } echo?Car::speedUp(); ?>
各位大神救救這個(gè)代碼吧,感謝~
2017-08-28
舉報(bào)
2017-08-28
class Car {
? ? public static $speed = 0;
? ? public static function speedUp(){
? ? ? ? return self::$speed += 10;
? ? }
}
echo Car::speedUp();
2018-07-27
,靜態(tài)方法不能用this->? 靜態(tài)調(diào)用用雙冒號(hào)
2018-05-21
::兩個(gè)雙引號(hào)什么意思啊?