Re: a way to fix the import issue

From: Date: Fri, 05 Oct 2007 02:07:58 +0000
Subject: Re: a way to fix the import issue
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-32638@lists.php.net to get a copy of this message
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

« previous php.internals (#32638) next »