Hi
Im loooking to have a class that extends more than one class
include("b.php"); include("c.php"); Class A extends b {}
This is fine
but when i try Class A extends b,c {}
It does not work.
Im sure you can extend more than one class!
Yours
Chris
PHP doesn't support multiple inheritance. Try multiple c extends b extends a.
Well that kind of sucks, is this a limitation PHP at last!!
Nope, it's a feature. I'm happy to not see multiple inheritence. If I need that kind of functionality, I'll create an instance var of the second class.....I've never seen a good reason for multiple inheritance, but that's just my opinion, I could be wrong.
I may be missing something - but does that mean
class a { }
Class b extends a {
}
Class c extend b { }
Will not work - and have all the functions of a and b in c
That will work. multiple inheritance from one class will not work i.e.
class c extends a,b{ } will not work but
class a{ }
class b extends a{ }
class c extends b{ }
will work and class c will have all attributes and functions of classes a and b.