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 — Devuelve un array de los traits utilizados por esta clase
Devuelve un array de los traits utilizados por esta clase.
Esta función no tiene parámetros.
Devuelve un array con el nombre del trait como clave y las instancias
ReflectionClass de los traits en cuestión como valores.
Devuelve null
en caso de error.
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