function checkEat($obj){
if($obj instanceof ICanEat){
$obj->eat('food');
}else{
echo "The obj can't eat.\n";
}
}
if($obj instanceof ICanEat){
$obj->eat('food');
}else{
echo "The obj can't eat.\n";
}
}
2018-01-28
Nbaplaye$jordan = new Nbaplayer();中的Nbaplayer()跟上面的class Nbaplayer()有关系吗
2018-01-25