How would static::class behave ? is it handled by the current patch?
Maybe the test case could be extended to reflect this, and also for
self::class?
Fantastic question. I am unsure how to handle this. Currently, it will
simply resolve those names against the rules (I am sure this is the
wrong behavior.) So,
namespace Foo\Bar { var_dump(self::class); }
Would now produce:
string(12) "Foo\Bar\self"
This is the same with 'self', 'static', and 'parent'. I guess the
question is, should that produce a compile error, or conditionally work
depending on if you are inside of a class declaration or not?
I will add this consideration to the RFC.
-ralph
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php