Re: Using call_user_function with closures
| From: | spam at geleia dot net | Date: | Thu, 01 Jan 1970 00:00:00 +0000 |
| Subject: | Re: Using call_user_function with closures | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-48359@lists.php.net to get a copy of this message | ||
On Wed, May 19, 2010 10:48 pm, Alec wrote:
> I am taking over an extension from one of my coworkers, and it was
> written before the time of PHP 5.3. Are there any special considerations to
> think about when using closures with call_user_function? This is the
> current line:
>
> if (call_user_function(EG(function_table), NULL, &callback, &local_retval,
> 1, argsv TSRMLS_CC ) == FAILURE) {
>
>
> However, when the extension is loaded, it crashes on this line when
> callback is a closure. When callback is a string (a userspace function
> name), everything works fine.
>
I suppose that also doesn't work with callbacks with methods.
You may find this thread in pecl-dev useful:
http://marc.info/?t=127186855100001&r=1&w=2
--
Gustavo Lopes