这篇文章主要介绍了关于instanceof的使用方法,有着一定的参考价值,现在分享给大家,有需要的朋友可以参考一下
测试单独一个类:
1Copy after login
当一个子类继承父类:
1Copy after login
当实现接口时:
Copy after login
以上就是本文的全部内容,希望对大家的学习有所帮助,更多相关内容请关注PHP中文网!
相关推荐:
The above is the detailed content of How to use instanceof. For more information, please follow other related articles on the PHP Chinese website!