Anonymous functions are available from PHP 5.3.
Should I use them or avoid them? If so, how?
Edited: just found some nice trick with PHP anonymous functions:
$container = new DependencyInjectionContainer();
$container->mail = function($container) {};
$container->db = function($container) {};
$container->memcache = function($container) {};
Anonymous functions are useful when using functions that require a callback function like
array_filterorarray_mapdo:Otherwise you would need to define a function that you possibly only use once: