PHP - Inheritance and Polymorphism
Given the following classes, what will be the output when creating a new
Child object?class Parent {
public function __construct() {
echo "Parent start. ";
}
}
class Child extends Parent {
public function __construct() {
echo "Child start. ";
parent::__construct();
echo "Child end.";
}
}
new Child();