For PHP 7.0 the ReflectionType API was introduced in conjunction with return types . Its minimal API was intended to be the base for future improvements; this RFC contains some of those improvements.

This RFC adds two new subtypes for ReflectionType ; here are their stubs:

class ReflectionNamedType extends ReflectionType { public function getName ( ) : string ; } class ReflectionClassType extends ReflectionNamedType { public function getClass ( ) : ReflectionClass ; }

If the engine does not recognize a type it will call the autoloader; if the class is found then a ReflectionClassType will be returned. Presently in all other cases a plain ReflectionNamedType will be returned but this may change in the future. For instance if we had intersection types they would be unnamed and therefore would be different subtype of ReflectionType .