Inheritance in PHP

Hello Readers ,

Here’s the explanation of concept of Inheritance in PHP.

What is inheritance?

Inheritance is nothing but a design principle in oops. By implementing inheritance we can inherit(or get) all properties and methods of one class to another class.The class who inherit feature of another class known as child class.The class which is being inherited is know as parent class.

Body of Single level Inheritance.

    class grandParent
    {
    //Body of your class
    }
    class parent extends grandParent
    {
    //Body Of your class
    }

Read the full Blog at: Inheritance in PHP .

If you have any query related to PHP language then goto to our PHP Developer Forum. FindNerd community is a right place where you can post and look for PHP Questions and Answers .

Advertisements
Inheritance in PHP

One thought on “Inheritance in PHP

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s