Quoting Stanislav Malyshev <[EMAIL PROTECTED]>:
But you shouldn't even look for Exception then. I'm saying that if
you want the global Exception class you should import it.
That would be double bad - that means you have to go over all your
code and add :: to all instances of global classes, even though you
never ever intended to override any of them. I don't think it's a
good idea.
No, you just have to import them into your namespace, right next to
the namespace declaration. Which solves both problems - ease of using
global classes and the extra autoload.
Honestly I don't know if having a PHP:: namespace with an alias to the
builtin classes is feasible, but if it is, then the simple, "put
global classes into my namespace" ("register_globals" ;) option is:
namespace Test;
import PHP;
-chuck
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php