Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:320 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 54384 invoked from network); 26 Mar 2003 18:16:52 -0000 Received: from unknown (HELO localhost.localdomain) (65.198.110.5) by pb1.pair.com with SMTP; 26 Mar 2003 18:16:52 -0000 Received: (from andrei@localhost) by localhost.localdomain (8.11.6/8.11.6) id h2QIG0D10095; Wed, 26 Mar 2003 13:16:00 -0500 X-Authentication-Warning: localhost.localdomain: andrei set sender to andrei@gravitonic.com using -f Date: Wed, 26 Mar 2003 13:16:00 -0500 To: Stanislav Malyshev Cc: PHP Internals Message-ID: <20030326181600.GA10068@hyperion.gravitonic.com> Mail-Followup-To: Andrei Zmievski , Stanislav Malyshev , PHP Internals References: <20030326180213.GA10036@hyperion.gravitonic.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4i Subject: Re: [PHP-DEV] Namespaces bug From: andrei@gravitonic.com (Andrei Zmievski) Care to explain a little more? I think allowing this syntax is very confusing for the user. I can see the point of this: namespace A { class B { ... } } ... namespace A { class C { ... } } But not in the example below. People would basically expect to have nested namespaces, which we don't have, so why lead them on? On Wed, 26 Mar 2003, Stanislav Malyshev wrote: > Noting to fix. This is by design. > > AZ>> namespace A { > AZ>> namespace B{ > AZ>> class C { > AZ>> function D() { print "asdf\n"; } > AZ>> } > AZ>> } > AZ>> > AZ>> } > AZ>> > AZ>> B::C::D(); > AZ>> > AZ>> Apparently, the parser allows nesting namespaces, but they are all > AZ>> registered as global ones. Should be fixed, I think. -Andrei http://www.gravitonic.com/ * The great thing about standards is that there are so many to choose from. *