2012-03-13 41 views
10

我最近重新编译我的PHP和突然旧代码(连同来自互联网的例子)停止编译。php模块不能编译。不识别“静态function_entry”

This确切的例子不能编译。

片段有问题的代码:

static function_entry hello_functions[] = { 
    {NULL, NULL, NULL} 
}; 

这是错误:

/home/user/php_module/test_module/hello.c:12: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘hello_functions’ 

可能是什么问题呢?

回答

19

解决方案
它是新的PHP 5.4 找到了答案here

的差异现在已经有静态zend_function_entry

厂更换function_entry

+0

谢谢。你救了我的一天 – apis17 2013-07-23 04:37:21