PHP 类相关函数
2013-03-14 21:54
211 查看
bool class_alias ( string
bool class_exists ( string $class_name [, bool $autoload ] )— 检查类是否已定义
string get_called_class ( void ) —获取静态方法调用的类名
array get_class_methods ( mixed $class_name )— 返回由类的方法名组成的数组
array get_class_vars ( string $class_name )— 返回由类的默认属性组成的数组
string get_class ([ object $obj ] )— 返回对象的类名
array get_declared_classes ( void )— 返回当前脚本中已定义类的名字组成的数组
array get_declared_interfaces ( void )— 返回当前脚本中所有已声明的接口的名字数组
array get_object_vars ( object $obj )— 返回由对象属性组成的关联数组
string get_parent_class ([ mixed $obj ] )— 返回对象或类的父类名
bool interface_exists ( string $interface_name [, bool $autoload ] )— 检查接口是否已被定义
bool is_a ( object $object , string $class_name )— 如果对象属于该类或该类是此对象的父类则返回 TRUE
bool is_subclass_of ( object $object , string $class_name )— 检测对象是该类的子类实例化得到的
bool method_exists ( object $object , string $method_name )— 检查类的方法是否存在
bool property_exists ( mixed $class , string $property ) — 检查对象或类是否具有该属性
$original, string
$alias[, bool
$autoload=
TRUE] ) — 为一个类创建别名
bool class_exists ( string $class_name [, bool $autoload ] )— 检查类是否已定义
string get_called_class ( void ) —获取静态方法调用的类名
class foo { static public function test(){ var_dump(get_called_class()); } } class bar extends foo {} foo::test(); bar::test();
array get_class_methods ( mixed $class_name )— 返回由类的方法名组成的数组
array get_class_vars ( string $class_name )— 返回由类的默认属性组成的数组
string get_class ([ object $obj ] )— 返回对象的类名
array get_declared_classes ( void )— 返回当前脚本中已定义类的名字组成的数组
array get_declared_interfaces ( void )— 返回当前脚本中所有已声明的接口的名字数组
array get_object_vars ( object $obj )— 返回由对象属性组成的关联数组
string get_parent_class ([ mixed $obj ] )— 返回对象或类的父类名
bool interface_exists ( string $interface_name [, bool $autoload ] )— 检查接口是否已被定义
bool is_a ( object $object , string $class_name )— 如果对象属于该类或该类是此对象的父类则返回 TRUE
bool is_subclass_of ( object $object , string $class_name )— 检测对象是该类的子类实例化得到的
bool method_exists ( object $object , string $method_name )— 检查类的方法是否存在
bool property_exists ( mixed $class , string $property ) — 检查对象或类是否具有该属性
相关文章推荐
- 关于php的时间相关函数需要注意时区问题
- PHP获取字段长度相关函数使用技巧
- PHP操作数组相关函数
- php数组的相关处理函数(上)
- PHP文件读写操作相关函数总结
- PHP 数据库相关函数
- php中相关函数
- php数组操作相关函数reset()list()
- PHP性能分析相关的函数
- Zend studio for eclipse中使php可以调用mysql相关函数的设置方法
- PHP数组的相关处理函数1
- PHP选项及信息相关函数-3
- php数组函数相关内容
- php数组的相关处理函数
- PHP扩展之XML操作(三)——XML解析器使用及相关函数
- 倒计时相关函数 php
- php执行linux系统命令的相关函数exec|system|popen
- PHP知识点 - json_decode 返回 NULL,PHP 的 JSON 相关函数
- PHP文件属性相关函数
- PHP数组相关函数