Advanced example of PHP traits

With the introduction of PHP 5.4 traits are included. A trait is a mix between an interface and a class. Look on wikipedia for a more detail description on what traits are. Or check Scala which also uses traits.

When searching on the web for a real world example of using traits I did not find very much which was directly clear and somewhat more complete then FooBar or HelloWorld. So I tried to make a more real life example with animals and give an example how to use traits in PHP 5.4. Continue reading Advanced example of PHP traits