Need Assistance?

support@tutorialshub.in

Object-Oriented PHP (OOP)

Inheritance, Overriding & final

ADVERTISEMENT
PHP Free Lesson
5 min read
ADVERTISEMENT

A child class can inherit properties and methods from a parent class using extends, and customize behavior by overriding a method (optionally calling parent::method()). Mark a class or method final when you want to prevent subclasses from overriding it.

ADVERTISEMENT
Hi, I'm Tuby! Here to help you