array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'it', ), 'this' => array ( 0 => 'function.trait-exists.php', 1 => 'trait_exists', 2 => 'Checks if the trait exists', ), 'up' => array ( 0 => 'ref.classobj.php', 1 => 'Classes/Object Funzioni', ), 'prev' => array ( 0 => 'function.property-exists.php', 1 => 'property_exists', ), 'next' => array ( 0 => 'book.ctype.php', 1 => 'Ctype', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/classobj/functions/trait-exists.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>

trait_exists

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

trait_existsChecks if the trait exists

Descrizione

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.