What type of inheritance that PHP supports?
Answer Posted / mahesh
PHP can support single,multilevel,hierarchical and hybrid
inheritance but not multiple inheritence because of diamond problem.
Q:what is diamond problem?
A:suppose "class A extends class B and also class C".
then if class B contains function foo() and class C also contains function foo().if your creates object to the class A
and try to call function foo() then which class function it will take class A or Class B.. in this case diamond problem will be occur.
But we can avoid this problem through "INTERFACE".
| Is This Answer Correct ? | 12 Yes | 1 No |
Post New Answer View All Answers
How do I install php and apache on windows 10?
What are the main error types in php?
Tell me is it possible to submit a form with a dedicated button?
What is the use of extract function in php?
How can image properties be retrieved in php?
What is the purpose of using php?
Explain me what are the 3 scope levels available in php and how would you define them?
What is $_ get in php?
What is the most common http method?
Tell me how can we display information of a variable and readable by human with php?
Tell me when a conditional statement is ended with an endif?
What is artisan in php?
Explain PHP?
How many keywords are there in php?
Php error constants and their descriptions