Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:48358 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 92102 invoked from network); 19 May 2010 22:00:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 May 2010 22:00:31 -0000 Received: from [127.0.0.1] ([127.0.0.1:19875]) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ECSTREAM id F1/EA-33920-F7F54FB4 for ; Wed, 19 May 2010 18:00:31 -0400 X-Host-Fingerprint: 99.34.205.145 unknown Received: from [99.34.205.145] ([99.34.205.145:17500] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EE/7A-33920-4BC54FB4 for ; Wed, 19 May 2010 17:48:37 -0400 Message-ID: To: internals@lists.php.net Date: Wed, 19 May 2010 17:48:41 -0400 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 99.34.205.145 Subject: Using call_user_function with closures From: alecgorge@gmail.com (Alec) 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. Thanks, Alec