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