Class1
Class2 extends Class1
Class3 extends Class2
In Class2 I have a constructor that does not take in any arguements but it sets up some value to some variables.
When create an object of Class3, I assumed that the constructor for Class2 would be called and set up values for the variables in Class2.
But it didn't.
$test = new Class3();
echo "some value: $test->var1"; // var1 is a variable from Class2
The result was empty (nothing was set).
How do I get the Constructor of Class2 to be executed when I create an object of Class3 ?
Thanks in advance.