PHP OOP: Late Static Binding

Late static Binding:

  • Late static binding helps to override name by using static in echo keyword.
  • It helps lot for writing minimum coding.
  • The message of the base class is printed using the self keyword and the message of the derived class is printed using the static keyword.

Example to printing the message of base class:


Example of printing the message of derived class:


Tagged : / / / / / / / / / / / /