what are traits?
ReportQuestion
2 years ago 794 views
Traits are a mechanism that allows you to create reusable code in languages like PHP where multiple inheritance is not supported.
Traits are a mechanism that allows you to create reusable code in languages like PHP where multiple inheritance is not supported. A Trait cannot be instantiated on its own.
It’s important that a developer knows the powerful features of the language (s)he is working on, and Trait is one of such features.
Thread Reply