(2015-08-01, 20:21:33)Angryboy Wrote: 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 theindex.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 usingcreate_function
, but those require defining the functions within strings, and they still don't allow for variable importing.
Yes, I'm aware. Open to suggestions for 'better' code (& explanation), just proposing something alike not to leave ppl with PHP 5.2- (an already negligeable minority?) in the cold. (Maybe GS should move to support PHP5.3 instead of 2 because according to w3techs it has less than 0.1% usage