Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:48359 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 2650 invoked from network); 19 May 2010 23:25:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 May 2010 23:25:28 -0000 Authentication-Results: pb1.pair.com header.from=spam@geleia.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=spam@geleia.net; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain geleia.net from 212.113.174.24 cause and error) X-PHP-List-Original-Sender: spam@geleia.net X-Host-Fingerprint: 212.113.174.24 mx.netcabo.pt Received: from [212.113.174.24] ([212.113.174.24:54912] helo=mx.netcabo.pt) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 32/3C-33920-56374FB4 for ; Wed, 19 May 2010 19:25:27 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAO4P9EtThGjh/2dsb2JhbACdf3K+FoUQBA Received: from a83-132-104-225.cpe.netcabo.pt (HELO geleia.net) ([83.132.104.225]) by neti04smtpa.hdi.tvcabo with ESMTP; 20 May 2010 00:25:22 +0100 Received: from www.geleia.net ([192.168.1.2]) by geleia.net with hMailServer ; Thu, 20 May 2010 00:22:42 +0100 Received: from 93.108.152.52 (SquirrelMail authenticated user spam) by www.geleia.net with HTTP; Thu, 20 May 2010 00:22:42 +0100 (GMT Daylight Time) Message-ID: <65171.93.108.152.52.1274311362.squirrel@www.geleia.net> In-Reply-To: References: Date: Thu, 20 May 2010 00:22:42 +0100 (GMT Daylight Time) To: "Alec" Cc: internals@lists.php.net User-Agent: SquirrelMail/1.5.1 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] Using call_user_function with closures From: spam@geleia.net 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