相关疑难解决方法(0)

为什么以及如何在PHP中使用匿名函数?

PHP 5.3提供匿名函数.
我应该使用它们还是避免使用它们?如果是这样,怎么样?

编辑 ; 刚刚用php匿名函数发现了一些不错的技巧......

$container           = new DependencyInjectionContainer();
$container->mail     = function($container) {};
$conteiner->db       = function($container) {};
$container->memcache = function($container) {};
Run Code Online (Sandbox Code Playgroud)

php anonymous-function

44
推荐指数
3
解决办法
4万
查看次数

标签 统计

anonymous-function ×1

php ×1