前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >php常见的判断函数

php常见的判断函数

作者头像
joshua317
发布2018-04-10 17:31:26
1.8K0
发布2018-04-10 17:31:26
举报
文章被收录于专栏:技术博文技术博文

一、文件、目录

1、is_file();//文件是否存在

2、is_dir();//目录是否存在

二、函数、类、接口

1、function_exists();//函数是否存在

bool function_exists ( string $function_name )

2、class_exists();//检测类是否已定义

bool class_exists ( string $class_name [, bool $autoload ] )

3、interface_exists();//检查接口是否已定义

bool interface_exists ( string $interface_name [, bool $autoload ] )

4、method_exists() ;// 检查类的方法是否存在

bool method_exists ( object $object , string $method_name )

5、property_exists() ;检查对象或类是否具有该属性

bool property_exists ( mixed $class , string $property )

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2014-03-17 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档