|
|
#1 |
|
Registered User
Join Date: Sep 2015
Posts: 483
|
Inheritance That Php Supports?
Hello Dear,
Please Tell Me What Type Of Inheritance That Php Supports?
__________________
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. |
|
|
|
|
|
#2 |
|
Registered User
Join Date: Feb 2016
Posts: 1,680
|
In php, Inheritance is a core precept of object-orientated Programming (OOP) that allows a child elegance to inherit the residences and techniques of a determine class using the extends keyword. personal home page generally supports unmarried Inheritance, meaning a category can inherit from handiest one parent class at a time. This structure prevents the complexity and "Diamond problem" determined in other languages. additionally, personal home page supports Multilevel Inheritance, in which a toddler class can grow to be a determine to another class, creating a chain of inheritance (as an instance, elegance C inherits from magnificence B, which in turn inherits from class A).
__________________
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. |
|
|
|
|
|
#3 |
|
Registered User
Join Date: Oct 2012
Location: Rustenburg
Posts: 38
|
PHP uses a single inheritance model. This means a child class can only extend one parent class at a time. You cannot link a single class to multiple parents directly. However, PHP also supports multilevel inheritance. In this setup, a class extends a child class, which itself extends a base parent.
Think about how a tv guide works to see this in action. A base class might hold general data for any broadcast. A second class extends that to focus on a specific tv schedule for sports. Finally, a third class could extend the sports version to show only live scores. Each level gains features from the ones above it. |
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Importance of Php Development for Web Development | tech.biztech | Programming General | 35 | 11-22-2019 12:37 AM |
| PHP introduction | stevepatton | PHP / mySQL | 48 | 06-17-2019 02:02 AM |
| PHP Interview Questions And Answers | phpinterview199 | Review My Website | 0 | 06-06-2018 05:47 AM |
| PHP project training in ahmedabad, live project training in php ahmedabad | anantitsolution | Post your ad here | 1 | 07-16-2013 07:42 PM |
| Are you aware of the fact that PHP programming is the most widely used one? | johnrichards774 | PHP / mySQL | 3 | 02-07-2012 05:41 AM |