Extra ::class¶
It is possible to use ::class when reaching for static elements with the :: operator: the ::class returns the full name of the class, which is later used to look for the static. In the end, it does not add anything to the syntax and may be dropped.
Make sure to differentiate the initial name of in the syntax, which is a identifier: it is not confused by PHP with a constant of the same name. On the other hand, after a :: operator, ::class cannot be used on a string and it must be used on another object.