TRAIT_EXISTS
Checks if the trait exists
SYNTAX
trait_exists ( string $traitname [, bool $autoload ] ) : bool
PARAMETERS
traitname
Name of the trait to check
autoload
Whether to autoload if not already loaded.
RETURN
Returns TRUE if trait exists, FALSE if not, NULL in case of an error.
EXAMPLES
TRAITNAME
true
AUTOLOAD | FALSE
true
AUTOLOAD | TRUE
true