What are traits? How do they differ from inheritance and interfaces?
A trait is a block of methods and properties that can be composed into a class, working around PHP's single inheritance. An interface declares a contract with no implementation; inheritance gives an is-a relationship with one parent; a trait gives reusable implementation without a type relationship. Conflicts between traits must be resolved explicitly with insteadof or as.