PHP Traits and Grafts

Reading about traits and grafts in PHP: Request for Comments: Horizontal Reuse for PHP, PHP Traits, Using Traits in PHP 5.4 and PHP Traits: Good or Bad?. They mentioned the Diamond Problem.

I learned some new syntax too! E.g.:

 return $_instance ?: $_instance = new $class;

The ternary operator as a ‘binary’ operator! Cool! See here for details: Since PHP 5.3, it is possible to leave out the middle part of the ternary operator.