zend_call_method_with_N_params
在PHP扩展开发中有zend_call_method_with_0_params
, zend_call_method_with_1_params
和zend_call_method_with_2_params
。
但是如何调用超过2个参数的方法呢?
我之前的回答是错误的。 你必须zend_call_function directly
使用zend_call_function directly
。 查看zend_call_method
。 基本上你必须先准备一个zend_fcall_info
对象。 参数的数量应该存储在fci.param_count
字段中,而fci.params
应该有一个带有fci.param_count
元素的数组。