I need some help with inheritance in php. The code below does not produce any output.
Class Father{
var $car;
Function inherited(){
print $this->car;
}
}
Class Son Extends Father{
Function __Construct(){
$this->car='Benz';//I'm assuming here that car is still a property of father.
}
}
$obj= new Father;
$obj1= new Son;
# I expect it to print Benz here, but it doesn't.
$obj->inherited();
#There is no output.