zend_call_method_with_N_params

試著忘記壹切 提交于 2019-12-12 15:06:15

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!