Re: AW: [PHP-DEV] Namespace resolution

From: Date: Tue, 11 Dec 2007 23:43:45 +0000
Subject: Re: AW: [PHP-DEV] Namespace resolution
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.internals 
Request: Send a blank email to internals+get-33946@lists.php.net to get a copy of this message
David Zülke schrieb:
Let's assume we have ten autoloaders. We are, by import, in namespace Name::Space. Someone does new DateTime(); You would now have to go through all ten autoloaders before you can decide that no userspace class DateTime exists in any namespace, and thus the PHP internal class DateTime may be used.
I would assume its the fault of the programmer if he does it this way. When he is absolutely sure he wants to use PHP's internal class he could just do a new ::DateTime() and everything would be fine, no autoload function would be called. Regards, Frank

« previous php.internals (#33946) next »