Conversation
Notices
-
Huh. !TIL about #PHP's "trait" https://secure.php.net/trait
-
@chimo very interesting!
-
@mk yeah! The fact that the keyword 'use' is for both 'traits' and 'namespaces' got me confused for a bit though.
-
@chimo @mk Fuel for the fire: 'use' can also be used with anonymous functions to send out-of-scope variables in. :D
-
@windigo @mk yeah... saw that too. Chose to repress that memory :\
-
@windigo seen from a little larger distance: semantically, 'use' just means: "I want to make use of this, please make it available". So, same thing for all three use cases. ;-)
-
@windigo it's a bit like a single-celled organism (the object, function, whatever) sending out a tendril to make contact wit the outside world. ;-)
-
@chimo I had my reasons! Don't judge me! :D http://fragdev.com/blog/php-recursion-with-anonymous-functions
-
@windigo :D I'm sure it has valid use cases, like in your situation there