--TEST-- Reflecting object type hint --FILE-- getMethod('a')->getParameters()[0]->getType(); var_dump($typeHintOne->isBuiltin(), (string)$typeHintOne); $typeHintTwo = (new ReflectionClass(Two::class))->getMethod('a')->getParameters()[0]->getType(); var_dump($typeHintTwo->isBuiltin(), (string)$typeHintTwo); $typeHinta = (new ReflectionFunction('a'))->getParameters()[0]->getType(); var_dump($typeHinta->isBuiltin(), (string)$typeHinta); --EXPECTF-- bool(true) string(6) "object" bool(true) string(6) "object" bool(true) string(6) "object"