Fix ::class on string expression#1425
Conversation
4391423 to
5b30b6e
Compare
|
I think this code pattern isn't supported: https://3v4l.org/MM1pJ |
|
Absolutely right, but strangely enough this is: https://3v4l.org/Rb3oU |
|
Whaat!? :) Sounds like an inconsistency that should be reported in https://github.com/php/php-src/issues :) I just did: php/doc-en#1646 |
|
I'll let this sit here until php/doc-en#1646 is resolved :) |
|
So the conclusion in php/doc-en#1646 is unequivocal :) Can you please add a test that $foo = 'Foo';
var_dump($foo::class);And maybe also Thanks :) |
5b30b6e to
bb30737
Compare
|
The error cases are already covered by tests, so this should be ready to go :) |
may I ask how you realized this is a thing? did you see such code somewhere? |
|
I stumbled upon it while fumbling around with phpstan/phpstan#7391 😅 |
|
Thank you! |
No description provided.