PHP - Inheritance and Polymorphism
What will be the output of this PHP code?
class ParentClass {
public function __construct() {
echo "Parent\n";
}
}
class ChildClass extends ParentClass {
public function __construct() {
parent::__construct();
echo "Child\n";
}
}
new ChildClass();