PHP - How to avoid Parse errors on older servers when using new functions
问题 When I use an anonymous function ( but see also note below ) like : $f = function() use ($out) { echo $out; }; It produces an parse error on servers where PHP is older than 5.3.0 . My software needs to be compatible with unknown servers , but in the same time , I want also to use new functions, so I thought I will add some kind of a version check, if (o99_php_good() != true){ $f = function() use ($out) { echo $out; }; } where the o99_php_good() is simply function o99_php_good(){ // $ver= (