mitry Stogov
> Cc: 'Stanislav Malyshev'; 'php-dev'; 'Benjamin Schulz'
> Subject: Re: [PHP-DEV] a way to fix the import issue
>
>
> Dmitry Stogov wrote:
> > In your example :
> >
> > > namespace Foo;
> > import Blah::Exception;
> &g
Dmitry Stogov wrote:
> In your example :
>
> namespace Foo;
> import Blah::Exception;
> $a = new Exception;
> ?>
>
> "new Exception" refer to "Blah::Exception" and will fail if such class
> doesn't exists.
>
> "import Blah::Exception" creates an alias with short name "Exception" only
> for curr
Dmitry Stogov wrote:
> In your example :
>
> namespace Foo;
> import Blah::Exception;
> $a = new Exception;
> ?>
>
> "new Exception" refer to "Blah::Exception" and will fail if such class
> doesn't exists.
>
> "import Blah::Exception" creates an alias with short name "Exception" only
> for curr
")
May be I didn't understood the question. :)
Thanks. Dmitry.
> -Original Message-
> From: Stanislav Malyshev [mailto:[EMAIL PROTECTED]
> Sent: Thursday, October 04, 2007 12:50 AM
> To: Greg Beaver; Dmitry Stogov
> Cc: php-dev; Benjamin Schulz
> Subject: Re:
should in fact be implicitly importing Blah::Exception as if it were
Foo::Exception, rather than as ::Exception. In other words, I would
actually expect the above code to be equivalent to:
No, not really. It's equivalent to:
There's no class named Foo::Exception and import does not create