Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:28458 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 40008 invoked by uid 1010); 19 Mar 2007 21:53:44 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 39993 invoked from network); 19 Mar 2007 21:53:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Mar 2007 21:53:44 -0000 Authentication-Results: pb1.pair.com header.from=sean@caedmon.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=sean@caedmon.net; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain caedmon.net from 69.60.120.90 cause and error) X-PHP-List-Original-Sender: sean@caedmon.net X-Host-Fingerprint: 69.60.120.90 iconoclast.caedmon.net Linux 2.4/2.6 Received: from [69.60.120.90] ([69.60.120.90:42516] helo=iconoclast.caedmon.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9A/75-01604-6660FF54 for ; Mon, 19 Mar 2007 16:53:43 -0500 Received: from localhost ([127.0.0.1]) by iconoclast.caedmon.net with esmtp (Exim 3.35 #1 (Debian)) id 1HTPmz-0002hb-00; Mon, 19 Mar 2007 17:53:13 -0400 Message-ID: <45FF064A.8030703@caedmon.net> Date: Mon, 19 Mar 2007 17:53:14 -0400 User-Agent: Thunderbird 1.5.0.9 (X11/20070103) MIME-Version: 1.0 To: Robert Cummings CC: Stanislav Malyshev , Wez Furlong , 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> <45FEEF52.1060002@zend.com> <1174336464.24632.110.camel@blobule> <45FEF9A5.4050409@zend.com> <1174338801.24632.124.camel@blobule> <45FEFDCE.7050100@zend.com> <1174339527.24632.129.camel@blobule> In-Reply-To: <1174339527.24632.129.camel@blobule> X-Enigmail-Version: 0.94.2.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] PATCH: anonymous functions in PHP From: sean@caedmon.net (Sean Coates) > I'm not arguing the preservation of the exact value of $rev when the > anonymous function was created (as would be the case with a closure). > I'm thinking of the variable being whatever is defined in the parent > regardless. As in my proposal, the seek could search all the way up to > the top in which case the $rev would be found if it had been defined as > expected. At any rate, I guess this is diverging from the real > discussion of anonymous functions :) If you've ever tried to hack on the source to anything that you didn't write that also uses globals throughout (Gallery2, for example), you know how hard it is to track down a single layer of scope that can be defined [somewhere else]. Tracking this up the chain like a bubbled exception sounds like a nightmare for debugging/comprehension, and IMO it's too magical. One layer of scope might be useful: $_PARENT ? More than that, and my head starts to hurt. S