Does PHP support multiple inheritence?
am 16.08.2007 10:47:09 von Mukesh_Singh_NickDoes PHP support multiple inheritence?
If not, how would one workaround it when one needs a class to inherit
from multiple classes?
Does PHP support multiple inheritence?
If not, how would one workaround it when one needs a class to inherit
from multiple classes?
Mukesh_Singh_Nick wrote:
> Does PHP support multiple inheritence?
Yes... well, kind of. See the aggregate() function in the manual -- it
provides a very good approximation of multiple inheritance.
--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.12-12mdksmp, up 56 days, 13:44.]
Fake Steve is Dead; Long Live Fake Bob!
http://tobyinkster.co.uk/blog/2007/08/13/fake-bob/
On 16 Aug, 11:07, Toby A Inkster
wrote:
> Mukesh_Singh_Nick wrote:
> > Does PHP support multiple inheritence?
>
> Yes... well, kind of. See the aggregate() function in the manual -- it
> provides a very good approximation of multiple inheritance.
>
(which doesn't mean its a good idea)
C.
On Aug 16, 3:23 pm, "C."
> On 16 Aug, 11:07, Toby A Inkster
> wrote:
>
> > Mukesh_Singh_Nick wrote:
> > > Does PHP support multiple inheritence?
>
> > Yes... well, kind of. See the aggregate() function in the manual -- it
> > provides a very good approximation of multiple inheritance.
>
> (which doesn't mean its a good idea)
Why not?
pakalk wrote:
> On Aug 16, 3:23 pm, "C."
>> On 16 Aug, 11:07, Toby A Inkster
>> wrote:
>>
>>> Mukesh_Singh_Nick wrote:
>>>> Does PHP support multiple inheritence?
>>> Yes... well, kind of. See the aggregate() function in the manual -- it
>>> provides a very good approximation of multiple inheritance.
>> (which doesn't mean its a good idea)
>
> Why not?
>
Probably because most of the time multiple inheritance is grossly misused.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================