php检测函数是否存在函数 function_exists
2014-09-15 19:59
716 查看
php检测函数是否存在函数 function_exists
语法
bool function_exists ( string $function_name )
检查的定义的函数的列表,同时内置(内部)和用户定义的,为function_name。
返回值
如果function_name是一个函数存在,返回true,否则返回false。
if (function_exists('imap_open')) {
echo "imap functions are available.www.afish.cnblogs.com";
} else {
echo "imap functions are not available.
n";
}
//function_exists returns false on null and empty string:
if (function_exists('')) {
echo "empty string function existsn";
}
if (function_exists(null)) {
echo "null function existsn";
}
语法
bool function_exists ( string $function_name )
检查的定义的函数的列表,同时内置(内部)和用户定义的,为function_name。
返回值
如果function_name是一个函数存在,返回true,否则返回false。
if (function_exists('imap_open')) {
echo "imap functions are available.www.afish.cnblogs.com";
} else {
echo "imap functions are not available.
n";
}
//function_exists returns false on null and empty string:
if (function_exists('')) {
echo "empty string function existsn";
}
if (function_exists(null)) {
echo "null function existsn";
}
相关文章推荐
- php通过function_exists检测函数是否存在的方法
- php检测函数是否存在函数 function_exists
- PHP 检查给定的键名或索引是否存在于数组中 array_key_exists 函数
- php method_exists 检测类中是否包括函数
- php判断类是否存在函数class_exists用法分析
- php 在linux 用file_exists() 函数判断 另外一台服务器映射过来的文件是否存在 总是返回false
- php判断类是否存在函数 class_exists
- PHP检测函数是否存在
- PHP - Manual手册 - 函数参考 - Filesystem 文件系统函数 - file_exists检查文件或目录是否存在
- php判断类是否存在函数class_exists用法分析
- php数组函数序列之array_key_exists() - 查找数组键名是否存在
- php检测函数是否存在
- PHP判断某个数组中是否存在指定的key,函数array_key_exists()
- 检测用户名是否存在 Monxin专用(PHP代码函数)
- PHP - 函数 & 检测函数/类/方法是否存在
- php-Arrays 函数-array_key_exists-检查给定的键名或索引是否存在于数组中
- php数组函数序列之in_array() - 查找数组中是否存在指定值
- php循环检测目录是否存在并创建(循环创建目录)
- php循环检测目录是否存在并创建(循环创建目录)