[php-src] Issue #8802: Inconsistency about ::class and literal strings
| From: | ondrejmirtes | Date: | Thu, 16 Jun 2022 13:32:32 +0000 |
| Subject: | [php-src] Issue #8802: Inconsistency about ::class and literal strings | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-241745@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/8802
Author: ondrejmirtes
### Description
This doesn't work (https://3v4l.org/MM1pJ):
```php
<?php
$foo = 'Foo';
var_dump($foo::class);
```
But this does (https://3v4l.org/Rb3oU)
```php
<?php
var_dump('Foo'::class);
```
Is this intentional? I'd say both or neither should be supported.
### PHP Version
Irrelevant
### Operating System
N/A