User Contributed Notes

Boruta.info 14-Jan-2021 04:04
I was able to run it on Ubuntu + PHP 8.0. Currently newest version 0.5.0 is not adapted to PHP 8.0, although it seems to work. You have to download the source version and compile it manually (based on https://www.php.net/manual/en/install.pecl.phpize.php), but you will probably get compilation errors. In my case, there were a few minor bugs due to the missing `;` at the end of the return statement. There were also errors related to the removal of TSRM from PHP 8, but it was enough to add macros to the `.c` files.

May be useful (adds macros to the first line of all `.c` files in the current directory):

sed -i '1s / ^ / \ # ifndef \ TSRMLS_D \ n \ #define \ TSRMLS_D \ void \ n \ #define \ TSRMLS_DC \ n \ #define \ TSRMLS_C \ n \ #define \ TSRMLS_CC \ n \ #define \ TSRMLS_FETCH \ (\) \ n \ #endif \ n / '* .c
PHP8中文手册 站长在线 整理 版权归PHP文档组所有