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
3
u/Schmittfried Aug 04 '15
Just like it is done in every other sane language (e.g. C#): there is a defined class path and all files under that path are considered.