Class literal is a special annotation value, which is present in PHP only
instanceof operator. As a name suggests, this is full class name
Main advantage of this data type, is that it considers
use statements when
evaluating class name, so that short class name can be used.
Example of fully qualified class literal:
... /** * @MyAnnotation(MyVendor\MyProject\ClassName) */ public $name; ...
The same example with
... use MyVendor\MyProject\ClassName; ... /** * @MyAnnotation(ClassName) */ public $name; ...