var_dump is Moo::CLASS but the symbol Moo does not exist yet, only the
class Foo\Bar\Baz was declared at this point.

It could exist. It could be a class name handled by an autoloader somewhere else.

This method of class name resolving operates in the spirit of how our namespace implementation works. Namespaces don't actually "import" things into the files symbol table, it makes aliases for them, as such the namespace implementation alone never triggers an autoload simply b/c you were talking about a class somewhere.

The ::class resolver essentially does the same thing, for any given name you are talking about, it will resolve that name against the current namespace resolution rules.


Btw, interesting patch and nice implementation. I approved.

Best regards.


Thanks!
-ralph

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to