Re: zend_call_method() - support for up to 4 parameters
| From: | Johannes Schlüter | Date: | Wed, 18 Feb 2009 13:16:44 +0000 |
| Subject: | Re: zend_call_method() - support for up to 4 parameters | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-43090@lists.php.net to get a copy of this message | ||
On Wed, 2009-02-18 at 11:34 +0300, Antony Dovgal wrote:
> > recently, working on an extension, i wanted to call a method w/ 3 params,
> > and as you know, zend_call_method only supports 2 parameters at most. i
> > came across this thread in the archives,
[...]
> What happened to call_user_function() ?
> Why break the API and make extension maintainers use even more #if's ?
The benefit of zend_call_method is that you can keep the function
pointer and so the lookup has not to do the lookup every time it is
called which is quite nice.
But I don't think that a new limitation is any better: Tomorrow we have
to change it again as somebody has a reason to use 5 parameters, so if
it is changed it should be changed to take any number of arguments and
no fixed limit.... (or add a new API for that)
johannes