php8.5
Home/ Manual/ reflection / reflectionclass/ ReflectionClass::getTraitNames

ReflectionClass::getTraitNames

PHP function Edit on GitHub ✎

(PHP 5 >= 5.4.0, PHP 7, PHP 8)

Returns an array of names of traits used by this class

Description

ReflectionClass::getTraitNames(): array

Get the names of the traits used by this class.

Parameters Parameters

Return Values

Returns an array with trait names in values.

Source: reference/reflection/reflectionclass/gettraitnames.xml · from the official PHP manual (php/doc-en)