永夜海 发表于 2017-3-3 10:48:58

PHP对象

PHP的对象有没有特别之处呢,让爷瞧瞧
abstract
public、private、protected
final、static、const
get、set很样衰的说

$obj = new Obj();
if ($obj instanceof Obj) echo "yes"; //类比较


class_exists             类是否存在
get_class                返回类名
get_class_methods      所有方法名
get_class_vars         字段与其值
get_declared_classes
get_object_vars
get_parent_class         父类名
insterface_exists      接口是否存在
is_a                     是否该类或其子类
is_subclass_of         是否子类
method_exists            是否具有方法
页: [1]
查看完整版本: PHP对象