(PHP 5 >= 5.4.0, PHP 7, PHP 8)
trait_exists — Checks if the trait exists
$traitname
, bool $autoload = ?
) : bool
traitnameName of the trait to check
autoloadWhether to autoload if not already loaded.
Returns true if trait exists, false if not, null in case of an error.