tutorial code, snippets, experiments etc.
One : standard object with argument passed to contructor during instantiation.
Two : Defining a closure inside a class https://wiki.php.net/rfc/closures (The only official docs on closures)
Three : Defining a closure inside object
four : Traits From Mastering ObjectOriented Php by Brandon Savage