Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:28467 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 70231 invoked by uid 1010); 19 Mar 2007 22:33:37 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 70216 invoked from network); 19 Mar 2007 22:33:37 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Mar 2007 22:33:37 -0000 Authentication-Results: pb1.pair.com smtp.mail=stas@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=stas@zend.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 63.205.162.114 as permitted sender) X-PHP-List-Original-Sender: stas@zend.com X-Host-Fingerprint: 63.205.162.114 unknown Windows 2000 SP4, XP SP1 Received: from [63.205.162.114] ([63.205.162.114:32628] helo=us-ex1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8C/58-01604-0CF0FF54 for ; Mon, 19 Mar 2007 17:33:37 -0500 Received: from [127.0.0.1] ([192.168.16.109]) by us-ex1.zend.com with Microsoft SMTPSVC(6.0.3790.1830); Mon, 19 Mar 2007 15:33:33 -0700 Message-ID: <45FF0FBB.8040100@zend.com> Date: Mon, 19 Mar 2007 15:33:31 -0700 Organization: Zend Technologies User-Agent: Thunderbird 2.0b2 (Windows/20070116) MIME-Version: 1.0 To: ceo@l-i-e.com CC: Wez Furlong , Sean Coates , internals@lists.php.net References: <86478A67-DCA2-4000-9EF0-DA4338E8389B@omniti.com> <45FDF031.4010508@zend.com> <45FE2312.1050506@zend.com> <45FED6D9.8030307@caedmon.net> <45FEDAE5.2010309@zend.com> <45FEE396.7040905@caedmon.net> <0757BDEA-65F5-4123-B647-060DCA84B4B0@omniti.com> <32945.216.230.84.67.1174340098.squirrel@www.l-i-e.com> <45FF06B4.2060801@zend.com> <41955.216.230.84.67.1174343185.squirrel@www.l-i-e.com> In-Reply-To: <41955.216.230.84.67.1174343185.squirrel@www.l-i-e.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 19 Mar 2007 22:33:33.0803 (UTC) FILETIME=[A0B1A3B0:01C76A76] Subject: Re: [PHP-DEV] PATCH: anonymous functions in PHP From: stas@zend.com (Stanislav Malyshev) > Can't you just take the body of "create_function" with the syntax of > the patch, and marry those two? Well, that'd be a bit hard since the whole difference is that create_function is runtime (thus having access to run-time values) while anon-func we are trying to do here is compile-time (at least it makes a lot of sense to do it compile-time). We could of course just leave the scope thing alone and say "want access to other scope? tough luck, use create_function/eval or globals". > How does the current create_function handle this same scope issue? It doesn't AFAIK :) Since it's a close relative of eval, it can import values of variables by inserting ones into function string, but nothing more (i.e. you couldn't put an object there, and couldn't refer to a variable - only insert it's value). -- Stanislav Malyshev, Zend Products Engineer stas@zend.com http://www.zend.com/