Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:39081 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 71549 invoked from network); 18 Jul 2008 10:15:30 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Jul 2008 10:15:30 -0000 Authentication-Results: pb1.pair.com smtp.mail=moriyoshi@at.wakwak.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=moriyoshi@at.wakwak.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain at.wakwak.com designates 219.103.130.152 as permitted sender) X-PHP-List-Original-Sender: moriyoshi@at.wakwak.com X-Host-Fingerprint: 219.103.130.152 mgdnp2.nw.wakwak.com Received: from [219.103.130.152] ([219.103.130.152:61323] helo=mgdnp2.nw.wakwak.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 37/6B-31728-14D60884 for ; Fri, 18 Jul 2008 06:15:30 -0400 Received: from vckyb1.nw.wakwak.com (postfix@vckyb1.nw.wakwak.com [211.9.230.144]) by mgdnp2.nw.wakwak.com (8.14.3/8.14.3/2008-07-17) with SMTP id m6IAE9v9065130; Fri, 18 Jul 2008 19:14:09 +0900 (JST) (envelope-from moriyoshi@at.wakwak.com) Received: from at.wakwak.com (at.wakwak.com [211.9.230.135]) by vckyb1.nw.wakwak.com (Postfix) with ESMTP id BEBCA30067; Fri, 18 Jul 2008 19:14:09 +0900 (JST) Received: from [10.1.6.29] (c-gate0.bioinfo.sfc.keio.ac.jp [133.27.19.40]) (user=moriyoshi mech=CRAM-MD5) by at.wakwak.com (8.14.3/8.14.3/2008-07-15) with ESMTP/inet id m6IAE9pv074027; Fri, 18 Jul 2008 19:14:09 +0900 (JST) (envelope-from moriyoshi@at.wakwak.com) In-Reply-To: <10845a340807180306l6b2f78ek12d17a6729682d43@mail.gmail.com> References: <54FF091B-A4BE-4C3E-9783-D2DE93D6AF31@at.wakwak.com> <200807180110.38919.larry@garfieldtech.com> <50CB07D0-D4A6-45AF-9E54-A2D1C4F2E7BC@at.wakwak.com> <10845a340807180306l6b2f78ek12d17a6729682d43@mail.gmail.com> Mime-Version: 1.0 (Apple Message framework v753.1) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-ID: Cc: "Larry Garfield" , internals@lists.php.net Content-Transfer-Encoding: 7bit Date: Fri, 18 Jul 2008 19:09:53 +0900 To: RQuadling@googlemail.com X-Mailer: Apple Mail (2.753.1) Subject: Re: [PHP-DEV] [PATCH] Allow use($var..) statement ubiquitously From: moriyoshi@at.wakwak.com (Moriyoshi Koizumi) On 2008/07/18, at 19:06, Richard Quadling wrote: > 2008/7/18 Moriyoshi Koizumi : > > running test1.php ends up with two lines of "bar", surprisingly. > This is somewhat confusing, but surely one of the things that could > not ever be done. This might be a great help when you use a PHP- > script file as a mark-up template. > > Moriyoshi > > It was my understanding that include-d functions were added to the > global scope (or I suppose the active namespace). > > So, in that context, function b() use($a) {} should be getting the > $a from the global scope where $a == "foo". > > I would say that getting 2 "bar"s is wrong. Lexical scopes are completely irrelevant to which namespace the function belongs to. Moriyoshi