PHP is new for me. someone tell me that does PHP support multiple inheritances?
From the PHP manual:
Inheritance is a well-established programming principle, and PHP makes use of this principle in its object model. This principle will affect the way many classes and objects relate to one another. For example, when you extend a class, the subclass inherits all of the public and protected methods from the parent class. Unless a class overrides those methods, they will retain their original functionality. This is useful for defining and abstracting functionality, and permits the implementation of additional functionality in similar objects without the need to reimplement all of the shared functionality.
Inheritance is a well-established programming principle, and PHP makes use of this principle in its object model. This principle will affect the way many classes and objects relate to one another.
For example, when you extend a class, the subclass inherits all of the public and protected methods from the parent class. Unless a class overrides those methods, they will retain their original functionality.
This is useful for defining and abstracting functionality, and permits the implementation of additional functionality in similar objects without the need to reimplement all of the shared functionality.
Nothing is mentioned concerning multiple inheritances and the comments on the page seem to indicate that PHP does not support multiple inheritances.
Yeah, PHP does not support multiple inheritance of classes, but it does cover one common use case for multiple inheritance by permitting multiple inheritance of interface constructs.
Additionally PHP supports mixins known as [man]traits[/man]. Any number of traits can be included within a class definition.
Thanks for response.