Re: Re: namespaces: import name conflicts with defined class
| From: | Benjamin Schulz | Date: | Wed, 03 Oct 2007 09:19:00 +0000 |
| Subject: | Re: Re: namespaces: import name conflicts with defined class | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-32588@lists.php.net to get a copy of this message | ||
On 02.10.2007, at 22:04, Stanislav Malyshev wrote:
And what if not? "throw App::package::subpackage::Exception" in a file that has the namespace "App::package::subpackage" is just wrong, importing the Exception as a different name as well. Importing the global Exception as something else - i don't even know what to answer to that ... this problem makes the whole concept just seem broken, is there even a concept? ;) regards, Benjamin<?php import ::Exception as Notused; import Foo::Exception; ?>I wouldn't actually recommend using such code. If you have Foo::Exception just use Foo::Exception - it's short enough :)