What type of inheritance that PHP supports?
Answers were Sorted based on User's Feedback
Answer / vikas sharma
PHP can support single,multilevel inheritance. And you can
use interfaces to achive multiple inheritace but not
directly multiple inheritance is allowed due to its
limitations
| Is This Answer Correct ? | 68 Yes | 8 No |
Answer / rakesh kumar nautiyal
As far PHP concern it only support single Inheritance in
scripting.
| Is This Answer Correct ? | 66 Yes | 39 No |
PHP support all inheritance(Single,Multilevel,Hierarchical,
and Hi breed) except Multiple inheritance.but we can achieve
multiple inheritance through INTERFACE.
| Is This Answer Correct ? | 36 Yes | 11 No |
Answer / dinesh
along with single,multilevel php also supports hierarchy
| Is This Answer Correct ? | 22 Yes | 8 No |
Answer / koushik samanta
phP SUPPORTS ONLY mULTILEVEL AND SINGLE iNHERUTANCES
| Is This Answer Correct ? | 29 Yes | 17 No |
Answer / 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 |
Answer / kumar singh
all inhertance are supported but multiple not supported
and replace by interface used in php5
| Is This Answer Correct ? | 16 Yes | 7 No |
Answer / palaniraja.wordpress.com
you can also use interface to achieve multiple inheritance.
| Is This Answer Correct ? | 36 Yes | 28 No |
Answer / abdul ghafoor awan
What type of inheritance that php supports?
In PHP an extended class is always dependent on a single base class, that is, multiple inheritance is not supported. Classes are extended using the keyword 'extends'.
| Is This Answer Correct ? | 0 Yes | 0 No |
Explain some of the php array functions?
What is the basic function to search files for lines (or other units of text) that contain a pattern.
What is return value in php?
How to upload a file (may be a .txt or a .doc file) from a php script/file?
How to convert numbers to strings in php?
When you want to show some part of a text displayed on an html page in red font color? What different possibilities are there to do this? What are the advantages/disadvantages of these methods?
Where to put php files in apache server?
When viewing an html page in a browser, the browser often keeps this page in its cache. What can be possible advantages/disadvantages of page caching? How can you prevent caching of a certain page (please give several alternate solutions)?
Write a query to find the 2nd highest salary of an employee from the employee table?
Is php developer in demand?
How to test if a variable is an array?
how to upload more than 50 mb? i tried but session was expired....certain time .....i was set session duration three days .... how to rectified? if any one know that post ur answer as soon as possible? thanks