Php/docs/function.trait-exists

提供:Dev Guides
< Php
移動先:案内検索

trait_exists

(PHP 5 >= 5.4.0, PHP 7)

trait_existsトレイトが存在するかどうかを調べる


説明

trait_exists ( string $traitname [, bool $autoload ] ) : bool

パラメータ

traitname
調べたいトレイトの名前。
autoload
まだロードされていない場合にオートロードするかどうか。


返り値

トレイトが存在する場合に true、存在しない場合に false、エラーが発生した場合に null を返します。