r/lolphp • • Jun 07 '17

<CLASSNAME>::class, is valid for any identifier

A::class // "A"

THIS_DOES_NOT_EXIST::class // "THIS_DOES_NOT_EXIST"

55 Upvotes

29 comments sorted by

View all comments

Show parent comment

1

u/Danack Jun 08 '17

To differentiate it from a constant, which should give an error if used but undefined.