为什么这样写代码是错的啊
<?php
class car{
public $speed=0;
public function speedUp(){
return $speed+10;
}
$car=new Car();
$car->speedUP()
echo $car->speed;
?>
<?php
class car{
public $speed=0;
public function speedUp(){
return $speed+10;
}
$car=new Car();
$car->speedUP()
echo $car->speed;
?>
2017-03-18
举报