header('content-type:text/html;charset=utf-8');
class Human{
static public $head=1;
public function easyeat(){
echo '普通方法吃饭
';
}
static public function eat(){
echo '静态方法吃饭
';
}
public function intro(){
echo $this->name;
}
}
Error_reporting(E_ALL|E_STRICT);
//此时没有对象!方法可以执行
Human::eat();
Human::easyeat();
Human::intro();
$li=new Human();
$li->eat();
?>