奇葩的错误 速来人
<?php
abstract class Eat
{
abstract public function eat($food);
public function breath()
{
echo 'Breathing'.'<br />';
}
}
class Human extends Eat
{
public function eat($food)
{
echo 'Human eat'.$food.'<br />';
}
}
class Animal extends Eat
{
public function eat($food)
{
echo 'Animal eat'.$food.'<br />';
}
}
$monkey = new Animal();
$monkey->eat('apple');
?>
Fatal error: Cannot call abstract method Eat::eat() in D:\xampp\htdocs\oop\abstrct.class.php on line 25