无法使用 PHP 7.3 安装 REAR 扩展

can't Installing RAR extention with PHP 7.3

我正在尝试安装 rar 包。我检查了 php.net 的安装文档,它只是说执行 pecl -v install rar

/tmp/pear/temp/rar/rararch.c:34: note: this is the location of the previous definition
 #define _GNU_SOURCE

/tmp/pear/temp/rar/rararch.c: In function ‘rararch_it_get_iterator’:
/tmp/pear/temp/rar/rararch.c:961:25: error: ‘zend_class_entry’ {aka ‘struct _zend_class_entry’} has no member named ‘iterator_funcs’; did you mean ‘iterator_funcs_ptr’?
  it->parent.funcs = ce->iterator_funcs.funcs;
                         ^~~~~~~~~~~~~~
                         iterator_funcs_ptr
/tmp/pear/temp/rar/rararch.c: In function ‘minit_rararch’:
/tmp/pear/temp/rar/rararch.c:1173:18: error: ‘zend_class_entry’ {aka ‘struct _zend_class_entry’} has no member named ‘iterator_funcs’; did you mean ‘iterator_funcs_ptr’?
  rararch_ce_ptr->iterator_funcs.funcs = &rararch_it_funcs;
                  ^~~~~~~~~~~~~~
                  iterator_funcs_ptr
make: *** [Makefile:198: rararch.lo] Error 1
rolling back 441 file operations
ERROR: `make' failed

如何在 debian 10 上使用 php 7.3 安装 rar 扩展?

引用来自https://www.php.net/rar

的评论

Officially it support only php 5.3 to 7.1. With some luck it works on some 7.2 versions. The bug reports on the rar pecl-site aren't modified for years. I think this documentation on php.net should be removed, rar support is dead

其他方法:

shell_exec("unrar x $pathToRar $dirToExtractTo");