CVE漏洞中文网

0DayBank一个专门收集整理全球互联网漏洞的公开发布网站
  1. 首页
  2. 漏洞列表
  3. 正文

method_exists-2020/8/15

2020年8月15日 310点热度 0人点赞 0条评论

定义和用法

如果 method_name的方法在 object 所指的对象类中定义则返回 TRUE 否则返回 FALSE.

语法

bool method_exists(object object,string method_name)

参数解释:

object :对象

method_name :方法名数据

返回值

将返回一个bool值。

例子

class index{

function init(){

echo "start";

}

}

$ss = new index();

if (method_exists($ss, init)) {

$ss->init();
}else{

echo "Action does not exist";

}0daybank

标签: 暂无
最后更新:2020年8月15日

小助手

这个人很懒,什么都没留下

点赞
< 上一篇
下一篇 >

文章评论

您需要 登录 之后才可以评论

COPYRIGHT © 2024 www.pdr.cn CVE漏洞中文网. ALL RIGHTS RESERVED.

鲁ICP备2022031030号

联系邮箱:wpbgssyubnmsxxxkkk@proton.me