當前位置:
首頁 >
php检测函数是否存在函数 function_exists
發布時間:2025/5/22
175
豆豆
生活随笔
收集整理的這篇文章主要介紹了
php检测函数是否存在函数 function_exists
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
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";
}
?
轉載于:https://www.cnblogs.com/afish/p/3973535.html
總結
以上是生活随笔為你收集整理的php检测函数是否存在函数 function_exists的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 我的博客51CTO
- 下一篇: PHP版本的自动生成有规则的订单号(或编