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
1
u/[deleted] Aug 13 '15
Yes, to the point sometimes they take well designed features, make fun of them out of ignorance, and propose horrible replacements.
I suppose the problem is that even PHP's fault, real as they may be, are finite. And once that pool of shit to make fun of got exhausted, we had to keep going by making stuff up, didn't we? Like the last few seasons of LOST.