ReflectionProperty::getType
  プロパティの型を取得する
  
 
  説明
  
   public ReflectionTypenull ReflectionProperty::getType()
  
  
 
 
  戻り値
  
   プロパティが型を持っていれば、ReflectionType
   を返します。そうでなければ、 null を返します。
  
  
 
  例
  
   例1  ReflectionProperty::getType の例
   
<?php
class User
{
    public string $name;
}
$rp = new ReflectionProperty('User', 'name');
echo $rp->getType()->getName();
?>
 
    
   
   
   
  
 
  参考
  
   -  ReflectionProperty::hasType
 
   -  ReflectionProperty::isInitialized