Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:38681 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 41839 invoked from network); 29 Jun 2008 22:20:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Jun 2008 22:20:25 -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:64324] helo=mx1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DB/42-25765-7AA08684 for ; Sun, 29 Jun 2008 18:20:24 -0400 Received: from us-ex1.zend.com ([192.168.16.5]) by mx1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 30 Jun 2008 01:20:38 +0300 Received: from [192.168.17.37] ([192.168.17.37]) by us-ex1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Sun, 29 Jun 2008 15:20:34 -0700 Message-ID: <48680A9F.50504@zend.com> Date: Sun, 29 Jun 2008 15:20:15 -0700 Organization: Zend Technologies User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: Lars Strojny CC: Christian Seiler , Dmitry Stogov , php-dev List , Andi Gutmans References: <4856A547.3080801@gmx.net> <485A35A0.9050602@zend.com> <485AF253.2070400@gmx.net> <485B908D.7000106@zend.com> <4863C299.1080002@gmx.net> <1214777090.11320.13.camel@localhost> In-Reply-To: <1214777090.11320.13.camel@localhost> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 29 Jun 2008 22:20:34.0953 (UTC) FILETIME=[59C98F90:01C8DA36] Subject: Re: [PHP-DEV] [PATCH] [RFC] Closures and lambda functions in PHP From: stas@zend.com (Stanislav Malyshev) Hi! > * Class::__invoke() to allow functors[1]. The class "Closure" in > your proposal should also implement that method to make > method_exists() and ext/reflection behave. > * Change the behaviour how method calls are resolved. Method calls > on invokable objects (closures or functors) should work. And to close the circle, add __invoke to ReflectionFunctionAbstract and implement it in Reflectionfunctiom and ReflectionMethod (here we might have trouble with specifying object, so need to do some thinking on it - maybe we'll need another class or augment ReflectionMethod somehow?) > echo $view->escape(""); If we use this syntax, and $view->escape is not defined, should we call __call or __get? -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com