2012-03-13 82 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