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) {};
$conteiner->db = function($container) {};
$container->memcache = function($container) {};
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…