Note that getTraits will NOT return any traits inherited from a parent.
This is currently viewed as the desired behavior. See https://bugs.php.net/bug.php?id=61554(PHP 5 >= 5.4.0, PHP 7, PHP 8)
ReflectionClass::getTraits — Retourne un tableau des traits utilisés par cette classe
Retourne un tableau des traits utilisés par cette classe.
Cette fonction ne contient aucun paramètre.
Retourne un tableau avec le nom du trait en clé et des instances ReflectionClass des traits en question en valeurs.
Note that getTraits will NOT return any traits inherited from a parent.
This is currently viewed as the desired behavior. See https://bugs.php.net/bug.php?id=61554