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
usein conjunction with closures are also available in 5.3 or later (of course).I don’t understand the question completely, but because both closures and
usewith closures comes with the same version, there is no situation, where you can not useusewith closures. Either both, or nothing (–> <5.3)http://php.net/functions.anonymous
Release Notes 5.3.0