• Welcome to NamesLot.com Domain Name Forum

    NamesLot.com Domain Name Forum offers a fully open forum to discuss domain industry news and a 0% commission marketplace for you to buy and sell domain names.

    We have reorganized our Marketplace so now it is easier to get attention to your domain while it is also easier for buyers to find the right domain name.

    If you want us to add more threads to our marketplace, please contact us! Listing on our marketplace as always, 100% free! Register NOW or Login HERE!

Types of Inheritance in PHP.

henrywinsett

New Member
Inheritance means established programming protocol and PHP uses this protocol in the object model. This protocol affects various objects and classes related to one another. PHP supports only single inheritance. In PHP there are no multiple inheritance.
 
Similar to Java, PHP supports single inheritance. There is no multiple inheritance in php. Single inheritance means a class can extend only one parent class.
 
Inheritance is a well-established programming principle, and PHP makes use of this principle in its object model. This principle will affect the way many classes and objects relate to one another.
 
I am glad that i get such a good and useful information from all of you here about types of inheritance in php. This is very really good for me to knowing what is inheritance and what is its use in php.
 
Inheritance which are supported by PHP are:
1. Single level
2. hierarchical level
3. Multilevel


Multiple and Hybrid it does not support. It does support multiple inheritance but through use of interface not directly.
 
Inheritance is a mechanism that extends and existing class. Inheriting a class would mean creating a new class with all functionality of the existing class in addition to some more. The created class is called as a subclass of the parent class. Parent is a keyword which we use to access members of a parent class. Inheritance is usually defined by using the keyword “Extend”. $this is used a reference to the calling object. Inheritance avoids redundancy of code. 1. Single level 2. hierarchical level 3. Multilevel
 
Types of Inheritance include Single level, hierarchical level, Multilevel
Multiple and Hybrid it does not support. It does support multiple inheritance but through use of interface not directly
 

Members online

No members online now.

Forum statistics

Threads
19,885
Messages
69,882
Members
44,590
Latest member
KRS_Infotech
Active members today
1
New members today
0
New threads today
10
New posts today
10

Follow NamesLot on Twitter!

NamesLot proudly supported by

NamesLot proudly supported by

Top