Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:38554 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 92529 invoked from network); 23 Jun 2008 17:56:51 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Jun 2008 17:56:51 -0000 Authentication-Results: pb1.pair.com header.from=stas@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=stas@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 212.25.124.162 as permitted sender) X-PHP-List-Original-Sender: stas@zend.com X-Host-Fingerprint: 212.25.124.162 mail.zend.com Windows 2000 SP4, XP SP1 Received: from [212.25.124.162] ([212.25.124.162:47793] helo=mx1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 07/83-03212-2E3EF584 for ; Mon, 23 Jun 2008 13:56:51 -0400 Received: from us-ex1.zend.com ([192.168.16.5]) by mx1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 23 Jun 2008 20:57:00 +0300 Received: from [192.168.16.110] ([192.168.16.110]) by us-ex1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 23 Jun 2008 10:56:32 -0700 Message-ID: <485FE3C1.4010303@zend.com> Date: Mon, 23 Jun 2008 10:56:17 -0700 Organization: Zend Technologies User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: Christian Seiler CC: php-dev List References: <4856A547.3080801@gmx.net> <698DE66518E7CA45812BD18E807866CE01B11811@us-ex1.zend.net> <4858FCC7.5030305@gmx.net> <698DE66518E7CA45812BD18E807866CE01B70D73@us-ex1.zend.net> <48596C9E.2080605@gmx.net> In-Reply-To: <48596C9E.2080605@gmx.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 23 Jun 2008 17:56:32.0820 (UTC) FILETIME=[78A96740:01C8D55A] Subject: Re: [PHP-DEV] [PATCH] [RFC] Closures and lambda functions in PHP From: stas@zend.com (Stanislav Malyshev) Hi! > Hmm, seems like a good idea. If nobody objects in the next few days, > I'll rewrite my patch to use objects instead of resources. What class > name do you suggest? While we are at it maybe even having special standard handler (__invoke?) that could be also used by objects created by reflection and maybe later of some other purposes. I.e. if we do $foo($bar, $baz) and $foo is an object and it defines __invoke, then we call it (in which case if $foo is Closure it does its thing) otherwise we get an error "object $foo is not callable". Of course, this goes also for is_callable, etc. What do you think? -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com