Object-Oriented PHP: Working with Inheritance

Explore the idea of inheritance in object-oriented programming, and how inheritance works in PHP

Learn how inheritance works in PHP. This tutorial explores the concept of parent and child classes; overriding methods; final classes; abstract classes, and interfaces. Example code included.

In this article we're going to explore the idea of inheritance in object-oriented programming, and how inheritance works in PHP. With inheritance, your objects and classes can become much more powerful and flexible, and you can save a lot of time and effort with your coding.

We'll look at the following topics in this article:

  • The concept of inheritance, and why it's so useful
  • How one PHP class can inherit from another
  • How a child class can override some of the functionality of its parent
  • Working with final classes and methods
  • Using abstract classes, and
  • Working with interfaces.


Lubov Cholakova

Lubov CholakovaLubov has been with DMXzone for 8 years now, contributing to the Content and Sales departments. She is bringing high quality content in the form of daily blog updates, reviews, tutorials, news, newsletters,update emails and extensions' manuals. If you have a product that needs publicity or any other questions about the entire DMXzone community, she is the one you can contact.

See All Postings From Lubov Cholakova >>

Comments

Be the first to write a comment

You must me logged in to write a comment.