Hell, I can't even FIND the documentation for 'use' on the PHP site (other than in the context of namespaces - nice job ambiguating a keyword BTW).
Can someone confirm that function() use ($foo) { }
is only available in 5.3 and later? And where did you find that documented?
As an added bonus, how would you code around not being able to use 'use' (eg: with create_function($args, $funcname) as the callback for array_map())?
Closures are introduced in 5.3, thus use
in conjunction with closures are also available in 5.3 or later (of course).
As an added bonus, how would you code around not being able to use 'use' within a closure
I don't understand the question completely, but because both closures and use
with closures comes with the same version, there is no situation, where you can not use use
with closures. Either both, or nothing (--> <5.3)