PHP提供了一组 _exists 函数,用来检查是否存在一个方法、函数、属性、类、接口、文件或目录等。在较小规模的Application中这可能不大需要,但在大型的项目开发中随着团队成员人数的大幅增加,这种验证的作用就益发显得重要。
bool function_exists ( string $sFunctionName )
bool method_exists ( object $sObjectName, string $sMethodName )
bool class_exists ( string $sClassName [, bool autoload ] )
bool interface_exists ( string $sInterfaceName [ , bool autoload ] )
bool property_exists(object $sClassName, $sPropertyName)
bool file_exists(string $sFileName)






