A trait is a code-reuse mechanism for languages with single inheritance. A trait contains real methods and properties that are "inserted" into a class with the use keyword. PHP has supported traits since version 5.4.
When useful
When several unrelated classes need the same behaviour, but a shared base class is not appropriate. For example, Timestampable, SoftDeletable, HasSlug — behaviours that have no logical connection to each other.
Pitfalls
A trait is code copying, not abstraction — it does not replace an interface
Name conflicts between two traits require explicit resolution via insteadof / as
Hard to unit-test independently from the class that uses it