Another Inheritance Question

chevyown

New Member
From a quick Google search and a the wikipedia article on Multiple Inheritance, which quotes:\[quote\] Multiple inheritance refers to a feature of some object-oriented programming languages in which a class can inherit behaviors and features from more than one superclass. This contrasts with single inheritance, where a class may inherit from at most one superclass.\[/quote\]I understand that PHP doesn't allow multiple inheritance. What I can't find a clear answer on, however, is whether it allows more than one class to extend a superclass. Example:\[code\]class a {}class b extends a {}class c extends a {}\[/code\]In terms of what I'm trying to do, I'm making an RPG and want a 'generic' character class to include all the methods and properties that make the template of a character. Then I want classes to include specifics for each type of character (warrior, mage, etc), such as stats modifiers and special attacks.Is this possible?
 
Back
Top