1--TEST-- 2ReflectionType for static types 3--FILE-- 4<?php 5 6class A { 7 public function test(): static { 8 return new static; 9 } 10} 11 12$rm = new ReflectionMethod(A::class, 'test'); 13$rt = $rm->getReturnType(); 14var_dump($rt->isBuiltin()); 15var_dump($rt->getName()); 16var_dump((string) $rt); 17 18?> 19--EXPECT-- 20bool(false) 21string(6) "static" 22string(6) "static" 23