Re: Namespaces bug

From: Date: Wed, 26 Mar 2003 18:16:00 +0000
Subject: Re: Namespaces bug
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-320@lists.php.net to get a copy of this message
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. *

« previous php.internals (#320) next »