loading...

re: Multiple Inheritance with Traits in PHP VIEW POST

FULL DISCUSSION
 

One potential gotcha with traits is that unlike with mixins, which are a similar mechanism languages like Python use for multiple inheritance, traits work effectively by copying and pasting the content of the trait into the class using them. This means that you can't then create the same method on the class and refer to the parent defined in the trait like you can with mixins.

Code of Conduct Report abuse