// zoo.php
class Animal {
public function eats($food) {
echo "Yum, $food!";
}
}
$animal = new Animal();
$animal->eats('meat');
PHP knows what Animal is before executing new Animal, because PHP reads source files top-to-bottom. But what if we wanted to create ...