1 class Vehicle {
2 function __construct() {
3 $this->hookFunction();
4 }
5
6 function hookFunction() {
7 //
8 }
9 }
10
11 class Car extends Vehicle {
12
13 }
14
15 Class Toyota extends Car {
16
17 }
18
19 new Toyota(); // will you hook function
20 // this exclude static call to member functions, or other inline functions.
21