# Revisit: zend_call_method() - n number of arguments

- Thread: https://externals.io/message/55895
- Original archive: https://news-web.php.net/php.internals/55895
- Started by Nathan Nobbe on 2011-10-22T09:36:30+00:00
- Messages: 3
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #55895 — Nathan Nobbe — 2011-10-22T09:36:30+00:00

URL: https://externals.io/message/55895#55895

Hi,

Another old issue I'd like to rehash with the upcoming release around the
corner [1].

I patched 5.4 alpha2 for review [2].

Seems like the most appropriate time for a patch of this nature is during a
major release, per the previous conversation.

According to Marcus the patch is reasonable:

"I explained to him the exact terms under
which he can add the function. And his patch actually followed these terms
as far as I could see."

Would definitely help keep my PureMVC extension a little cleaner, if I ever
get around to finishing it :)

[1] http://marc.info/?l=php-internals&m=123493017101177&w=2
[2] http://pastebin.com/zygKe9Y5

thanks,

-nathan

---

## #55907 — Stas Malyshev — 2011-10-23T06:50:58+00:00

URL: https://externals.io/message/55895#55907 · In reply to: #55895

Hi!


> Hi,
>
> Another old issue I'd like to rehash with the upcoming release around the
> corner [1].
>
> I patched 5.4 alpha2 for review [2].

I think better idea would be to add another API function 
(zend_call_method_ex?), that implements arbitrary argument count (either 
via array or via varargs) and make zend_call_method be a case of it, 
maybe. This way you don't have to break existing API and also don't have 
to stop at 4.

-- 
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227

---

## #55910 — Nathan Nobbe — 2011-10-23T15:39:23+00:00

URL: https://externals.io/message/55895#55910 · In reply to: #55907

On Sun, Oct 23, 2011 at 12:50 AM, Stas Malyshev <smalyshev@sugarcrm.com>wrote:

> Hi!
>
>
> 
>
> > […]
>
> I think better idea would be to add another API function
> (zend_call_method_ex?), that implements arbitrary argument count (either via
> array or via varargs) and make zend_call_method be a case of it, maybe. This
> way you don't have to break existing API and also don't have to stop at 4.


Hi Stas,

That's what this patch does,  there is a new function
zend_call_method_multi, which takes an array, and I've revised zend_call
method to use it.  I could change it to varargs if that is preferred.

thanks,

-nathan
