PHP - Inheritance and Polymorphism
Identify the error in the following PHP code related to constructor inheritance:
class Base {
public function __construct() {
echo "Base constructor.";
}
}
class Derived extends Base {
public function __construct() {
parent::construct();
echo "Derived constructor.";
}
}
new Derived();