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

ReflectionClass::isTrait

PHP function Edit on GitHub ✎

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

Returns whether this is a trait

Description

ReflectionClass::isTrait(): bool

Check whether this ReflectionClass refers to a trait.

Parameters Parameters

Return Values

Returns true if this is a trait, false otherwise.

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