(PHP 7 >= 7.4.0)
ReflectionProperty::getType — Gets a property's type
Gets the associated type of a property.
Esta función no tiene parámetros.
   Returns a ReflectionType if the property has a type,
   and NULL otherwise.
  
Ejemplo #1 ReflectionProperty::getType() example
<?php
class User
{
    public string $name;
}
$rp = new ReflectionProperty('User', 'name');
echo $rp->getType()->getName();
?>
El resultado del ejemplo sería:
string