trait_exists
PHP Manual
PHP Manual»Classes/Object Funzioni»trait_exists

trait_exists

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

trait_existsChecks if the trait exists

Descrizione

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

Elenco dei parametri

trait

Name of the trait to check

autoload

Whether to autoload if not already loaded.

Valori restituiti

Returns true if trait exists, and false otherwise.

To Top