zend_call_method_with_N_params [英] 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
.
There are zend_call_method_with_0_params
, zend_call_method_with_1_params
and zend_call_method_with_2_params
in PHP extension development.
但是如何调用具有两个以上参数的方法?
But how to call method with more than 2 params?
推荐答案
我以前的回答是错误的.您必须使用zend_call_function directly
.请参见 zend_call_method
的正文.基本上,您必须先准备一个zend_fcall_info
对象.参数的数量应存储在fci.param_count
字段中,并且fci.params
应该具有包含fci.param_count
元素的数组.
My previous answer was wrong. You have to use zend_call_function directly
. See the body of zend_call_method
. Basically you have to prepare a zend_fcall_info
object first. The number of arguments should be stored in the fci.param_count
field and fci.params
should have an array with fci.param_count
elements.
这篇关于zend_call_method_with_N_params的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!