问题
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?
回答1:
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.
来源:https://stackoverflow.com/questions/8586996/zend-call-method-with-n-params