PHP - Inheritance and Polymorphism
What will be the output of the following PHP code?
class Animal {}
class Dog extends Animal {}
function greet(Animal $a) {
echo "Hello from Animal!";
}
$dog = new Dog();
greet($dog);