PHP Multiple Inheritance using Traits


The problem of multiple inheritances in PHP will occur when two classes are having same method. This can be avoided using “traits”. This feature is available from PHP version 5.4.0

Simple Multiple Inheritance using Traits:

 

Tags: ,

You may also like