Am 12.12.2007 um 01:04 schrieb Stanislav Malyshev:
Why? I did import Name::Space. According to the current lookup
rules, the first new DateTime() call creates a PHP internal class
since Name::Space::DateTime cannot be found (and autoloading would
only be triggered later), and the second DateTime() call does
create Name::Space::DateTime because by then, it has been
autoloaded and thus can be found in the current namespace.
Current namespace in your example is global space. Please reread the
docs on what "use" operator does and what "namespace" operator does.
I would also recommend avoiding "import" in your examples sine such
operator no longer exists.
Ah, yes, of course, my bad. Well, the problem still exists inside a
namespace, right?
And didn't you say "use" is a NOP just two hours ago?
David
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php