Vote Up 0 Vote Down

multiple inheritance not supported php

why there is no multiple inheritance in php

What is the reason for the omitting of multiple inheritance in php.


Vote Up 0 Vote Down
In usual object oriented approach Multiple Inheritance is the norm. But there is no Multiple Inheritance in PHP.
Because the designers of the PHP thought that it brings unwanted confusion while programming. Muliple Inheritance
allows a class to inherit from two classes.

So when these two classes have a common function which are totally
different then there will be a confusion for choosing which function to use. To avoid this confusion there is no
multiple inheritance in PHP.
flag | link |

Your Answer

Login before answering

Login with facebook