PHP 函数总结

感觉对函数了解的不够深,从头到尾梳理一遍(更新中。。。。)

1,class_exists(),interface_exists(),method_exists(),get_class(),get_parent_class()

class_exists:类是否存在

在创建对象之前判断类是否存在,如果不存在就应该先加载类,再创建对象,容错。

interface_exists:接口是否存在

method_exists: 方法是否存在

get_class:得到对象类名

get_parent_class:得到父类的类名(不管父类是否继承自其他类)

2.

原文地址:https://www.cnblogs.com/zwt0626/p/8718513.html