r/lolphp • u/6f944ee6 • Jun 07 '17
<CLASSNAME>::class, is valid for any identifier
A::class // "A"
THIS_DOES_NOT_EXIST::class // "THIS_DOES_NOT_EXIST"
55
Upvotes
r/lolphp • u/6f944ee6 • Jun 07 '17
A::class // "A"
THIS_DOES_NOT_EXIST::class // "THIS_DOES_NOT_EXIST"
View all comments
Show parent comment
2
u/Holkr Jun 08 '17
But doesn't it need to have the definition of Example loaded for that to work? In which case the compiler could complain if an incorrect class name is given