PHP Traits
What are PHP traits? In genetics, traits refer to a characteristic or an attribute in your DNA. For instance, you have a trait for eye colour, or hair type. In PHP traits refer to a set of common functions which can be used by multiple classes. I think of it almost as “includes for classes” (don’t quote me on that, its just a conceptual way of looking at it). As with most programming languages, PHP is easiest learned by example,…