trait_exists

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

trait_existsVerifica si un trait existe

Descripción

trait_exists(string $trait, bool $autoload = true): bool

Parámetros

trait

Nombre del trait a verificar

autoload

Si debe o no cargar automáticamente si no ha sido ya cargado.

Valores devueltos

Retorna true si el trait existe, y false en caso contrario.