instanceof
来源:互联网 发布:hemingway软件 编辑:程序博客网 时间:2024/06/05 22:32
php关键字:instanceof
判断一个对象是否是某一个类的实例
<?phpabstract class Test{ abstract function func1();}interface TestInterface{ public function func2();}class a extends Test implements TestInterface{ public function func1() { echo __METHOD__; } public function func2() { echo __METHOD__; }}$cls = new a;var_dump($cls instanceof Test); // truevar_dump($cls instanceof TestInterface); // truevar_dump($cls instanceof a); // true?>
0 0
- instanceof?
- instanceof
- instanceof
- instanceof
- instanceof
- instanceof
- instanceof
- instanceof
- instanceof
- instanceof
- instanceof
- instanceof
- instanceof
- instanceof
- instanceof
- instanceof
- instanceof
- instanceof
- Crystal Report中文顯示亂碼
- 网络判断(Wifi和3G)工具类
- 从java网络编程学起(2)
- CSS层叠样式表
- 分页技术COUNT STOPKEY和SORT ORDER BY
- instanceof
- Runtime.exec() 的陷阱
- Callable 和 FutureTask 生产者和消费者
- 【Wikioi】1065-01字符串
- Hibernate4学习(2)基于注解配置
- live555源码分析---- PLAY命令的处理
- java中字符串池,String池,共享池到底是怎么回事?
- javascript及基本语法
- SHELL排序