Traits are a mechanism for code reuse in PHP's single-inheritance model. A trait is like a class, but cannot be instantiated — it is designed to be used inside classes with the use keyword.
- Traits can contain methods and properties.
- A class can use multiple traits.
- Traits can use other traits.
Common use-cases: logging, timestamps, soft-delete, auditing.