zend_call_method_with_N_params [英] zend_call_method_with_N_params

查看:60
本文介绍了zend_call_method_with_N_params的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

PHP扩展开发中有zend_call_method_with_0_paramszend_call_method_with_1_paramszend_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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆