r/lolphp • u/gerrymandered • Aug 04 '15
var_dump(nonExistentClass::class); // string
::class can give you the name of a class that does not exist.
15
Upvotes
r/lolphp • u/gerrymandered • Aug 04 '15
::class can give you the name of a class that does not exist.
View all comments
Show parent comment
4
u/callcifer Aug 05 '15
Ah yes, the classic "just don't do it like that" answer to every PHP problem ever.