note 51997 deleted from keyword.extends by danbrown
| From: | danbrown@php.net | Date: | Wed, 17 Jun 2009 19:06:32 +0000 |
| Subject: | note 51997 deleted from keyword.extends by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-157035@lists.php.net to get a copy of this message | ||
Note Submitter: mga at nrd dot lt
----
[Editor's note: For an alternative to multiple inheritance, see the dynamic binding via object
aggregation in the corresponding section of the manual.]
Multiple Inheritance is not supported but it is easy to emulate it
The example listed above does not show the main advantages of multiple inheritance. I mean, that
multiple inheritance is used not for different outputs, but to combain properties ant functionality
from different classes.
If you will try to create complex structure based on this example, I am sure, will be big problems
regarding member variables values and etc.
In example, each time when you use "inherited" class it is temporarily created!
The main advantage of inheritance is direct incapsulation of member variables and functions. And
here are no possibility to use this advantage :(