Example #1
0
        }
    }
}
class Human
{
}
$animalerie = new Animalerie();
$felix = $animalerie->buyAnimal("chat", "Felix");
echo $felix->crier();
$animalerie->toiletter($felix);
var_dump($felix);
//$julien = new Human("Julien","Humain");
$julien = new Human();
//echo $julien->crier();
$animalerie->toiletter($julien);
die;
$eric = new Animal("Eric", "rat");
//$eric->espece = "chat"; //erreur
//echo $eric->espece;
echo $eric->getEspece() . "<br>";
$eric->setEspece("chat") . "<br>";
echo $eric->getEspece() . "<br>";
$eric->manger("croquette");
$jc = new Animal("Anna", "loutre");
echo $jc->crier();
$clio = new Vehicule();
$clio->plaque = "JX-768PO";
echo $clio->rouler();
echo $clio->rouler();
echo $clio->rouler();
echo $clio->rouler();