I would want to do that, but it's not entirely honest because PHP 5.3+ anonymous functions are closures (and this is used for importing variables in the
PHP 4-5.2 still have the old lambdas using
index.php
file). There is no equivalence of a true closure in PHP 5.2 and below, so global variables (or class members) would be needed.PHP 4-5.2 still have the old lambdas using
create_function
, but those require defining the functions within strings, and they still don't allow for variable importing.