RE: [PHP-DEV] a way to fix the import issue
| From: | Dmitry Stogov | Date: | Fri, 05 Oct 2007 06:54:12 +0000 |
| Subject: | RE: [PHP-DEV] a way to fix the import issue | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-32642@lists.php.net to get a copy of this message | ||
Hi Gregory,
It seems, your bug report and patches are right.
I'll look into them more careful little bit later.
Thank you very much.
Dmitry.
> -----Original Message-----
> From: Gregory Beaver [mailto:greg@chiaraquartet.net]
> Sent: Friday, October 05, 2007 6:08 AM
> To: Dmitry 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 :
> >
> > <?php
> > 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 current file (it doesn't creates "Foo::Exception")
> >
> > May be I didn't understood the question. :)
>
> http://bugs.php.net/42859 has a further example
>
> with patches for PHP 6 and PHP 5 in the report.
>
> Greg
>