为什么出错了 大家帮我看看怎么回事
<?php
date_default_timezone_set("PRC")
class Human{
public $name;
public $height;
public $weight;
public function eat($food){
echo this->name."'s eating ".$food."\n";
}
}
class NbaPlayer extends Human{
public $team="Bull";
public $playerNumber="23";
function __construct($name, $height, $weight, $team, $playerNumber){
$this->name=$name;
$this->height=$height;
$this->weight=$weight;
}
function __destruct(){
echo "Destroying".$this->name."\n";
}
public function run(){
echo "Running\n";
}
public function jump(){
echo "jumping\n";
}
public function dribble(){
echo "Dribbling\n";
}
$jordan=new NbaPlayer("Jordan","198cm","98kg","Bull","23");
echo $jordan->name."\n";
$jordan->eat("Apple");
}
?>
网页提示 错误 Parse error: syntax error, unexpected 'class' (T_CLASS) in F:\Demo\test.php on line 3