Re: Order of class resolution with namespaces and autoload

From: Date: Sat, 20 Oct 2007 23:19:48 +0000
Subject: Re: Order of class resolution with namespaces and autoload
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to internals+get-32892@lists.php.net to get a copy of this message
Quoting Stanislav Malyshev <stas@zend.com>:
Because if you say "Exception" inside any namespace, we should check if Foo::Exception not exists anywhere, which means full search of all autoloading possibilities. Only after we ensured that no such class exists anywhere, we might use Exception. Since using system classes is much more frequent than overloading them, performance would greatly suffer each time you use system class name inside namespace.
But you shouldn't even look for Exception then. I'm saying that if you want the global Exception class you should import it. -chuck

« previous php.internals (#32892) next »