Hey gang, in this PHP tutorial we’ll talk about inheritance. Inheritance is when a sub-class inherits properties and methods from a parent class, and allows us to create similar object types easily.
—————————————-

🐱‍💻 🐱‍💻 Course Links:

Course files – https://github.com/iamshaunjp/object-oriented-php

🐱‍💻 🐱‍💻 Other Related Courses:

+ PHP Tutorial for Beginners – https://www.youtube.com/playlist?list=PL4cUxeGkcC9gksOX3Kd9KPo-O68ncT05o

Comments (9)

  1. Instead of calling parent::__construct($username,$email); we can also write:

    $this->username = $username;

    $this->username = $username;

    And it will print the values.

    So what the difference?

    Thanks

Comments are closed.