我在php5.4中对闭包进行了几次测试,直到我启用了extension=operator.so
。从我所看到的是,当这个扩展被启用时,我不能声明这样的函数:
$myfunc = function($value) {
return $value;
}
echo $myfunc('Hello World');
FCGI因内部服务器错误而崩溃:
[Wed Aug 07 20:38:17 2013] [warn] [client x.x.x.x] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
[Wed Aug 07 20:38:17 2013] [error] [client x.x.x.x] Premature end of script headers: index.php
有人能帮我吗?谷歌有几天不是我的朋友了。
p.S.上面的代码是index.php 中剩下的唯一代码
在https://bugs.php.net/bug.php?id=65403在我看来,这正是你们的问题所在。它还没有修复,但正如该问题的评论中所描述的,可以通过将PHP升级到5.5.1并从github安装扩展来"解决"它。