PHP ::class keyword
According to PHP documentation about the ::class keyword, it can be used for class name resolution: You can get a string containing the fully qualified name of the ClassName class by using ClassName::class. 1namespace NS { 2 class ClassName { 3 } 4 5 echo ClassName::class; 6} 7 8// outputs: "NS\ClassName" It’s handy when you need to pass FQCN around. Some people even started using it to make sure that their code was referencing existing classes. Except that it’s written nowhere in the documentation that this keyword will ensure that the generated FQCN maps to an existing class! ...