-
Notifications
You must be signed in to change notification settings - Fork 461
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.