zend_call_method_with_N_params

发布于 2024-12-22 09:42:33 字数 174 浏览 4 评论 0原文

PHP扩展开发中有zend_call_method_with_0_paramszend_call_method_with_1_paramszend_call_method_with_2_params

但是如何调用超过2个参数的方法呢?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

泛滥成性 2024-12-29 09:42:33

我之前的回答是错误的。您必须直接使用zend_call_function。请参阅 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文