Re: Is there an RFC/discussion for ::class being a specific type?
| From: | Guilliam Xavier | Date: | Fri, 19 Nov 2021 12:27:59 +0000 |
| Subject: | Re: Is there an RFC/discussion for ::class being a specific type? | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-116463@lists.php.net to get a copy of this message | ||
>
> For example, this is valid:
>>
>> echo "string"::class;
>>
>
> What! Why is it allowed when it gives the same as string::class, and
> $string::class is an error? https://3v4l.org/hfvXm#v8.1rc3
>
Sorry I forgot the namespace... so it really gives the same as "string".
https://3v4l.org/rlZFF#v8.1rc3
Still surprising... maybe possibly useful for dynamically generated code? :/
--
Guilliam Xavier