1.php determine whether a system function or a function written by itself exists
BOOL Function_exists (string $function _name) determines whether a function has been defined, for example:
if (function_exists(' Curl_init ')) { curl_init ();} Else { echo ' not function Curl_init ';}
2.php determining whether a class exists
BOOL Class_exists (String $class _name [, bool $autoload = true]) checks whether a class has been defined, must return True, otherwise returns false, for example:
if (class_exists(' MySQL ')) { $myclass=newMySQL();}
3.php determines whether a method within a class has been defined
BOOL Method_exists (mixed $object, string $method _name) checks for the existence of a method of a class, for example:
$directory=new directory; if (! method_exists ($directory, ' read ') { echo ' does not define the Read Method!} ';}
4.php determines whether a property within a class has been defined
BOOL property_exists ( mixed $class
, string $property
) checks for the existence of a class's properties, for example:
$directory=new directory; if (!property_exists ($directory, ' Li ')) { echo ' does not have an LI attribute defined! ';}
PHP Determines if {function/class/method/property} exists