Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:40472 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 53772 invoked from network); 11 Sep 2008 17:02:13 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Sep 2008 17:02:13 -0000 Authentication-Results: pb1.pair.com smtp.mail=greg@chiaraquartet.net; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=greg@chiaraquartet.net; sender-id=unknown Received-SPF: error (pb1.pair.com: domain chiaraquartet.net from 208.83.222.18 cause and error) X-PHP-List-Original-Sender: greg@chiaraquartet.net X-Host-Fingerprint: 208.83.222.18 unknown Linux 2.6 Received: from [208.83.222.18] ([208.83.222.18:58453] helo=mail.bluga.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 68/22-42936-31F49C84 for ; Thu, 11 Sep 2008 13:02:12 -0400 Received: from mail.bluga.net (localhost.localdomain [127.0.0.1]) by mail.bluga.net (Postfix) with ESMTP id 47C60C0F3B0; Thu, 11 Sep 2008 10:01:23 -0700 (MST) Received: from pcp041155pcs.unl.edu (pcp041155pcs.unl.edu [129.93.124.94]) (using SSLv3 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.bluga.net (Postfix) with ESMTP id D01B7C0F36E; Thu, 11 Sep 2008 10:01:22 -0700 (MST) Message-ID: <48C94F10.1000508@chiaraquartet.net> Date: Thu, 11 Sep 2008 12:02:08 -0500 User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070807) MIME-Version: 1.0 To: Stan Vassilev | FM CC: internals@lists.php.net References: In-Reply-To: Content-Type: text/plain; charset=windows-1251 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP Subject: Re: Scoping of "use" statements and a strategy for 5.3/6.0 release of namespace From: greg@chiaraquartet.net (Greg Beaver) Stan Vassilev | FM wrote: > Hi, > > Multiple namespaces per file were introduced to allow certain > workflows in PEAR and frameworks like Symphony which can combine > multiple classes and namespaces in a single package. > > They work like this: > > > namespace X; > > ... > > namespace Y; > > ... > > > The problem is, no one thought of scoping "use" statements, so now > those merged files share their "use" imports, thus breaking all the > code where collisions occur. Hi, Stan, did you actually try this out? According to my checkout of CVS, you're wrong. Try this script: The output is: hi hi Fatal error: Class 'three::one' not found in /home/user/workspace/php5_func/test.php on line 11 Greg