Home > php教程 > php手册 > body text

php 之对象工具

WBOY
Release: 2016-06-13 11:31:29
Original
1019 people have browsed it

class_exists检查类是否已定义,如果类存在返回true

get_class返回对象的类名

get_class_methods返回由类的方法名组成的数组

get_declared_classes返回由已定义类的名字所组成的数组

is_callable检测参数是否为合法的可调用结构 

method_exists检查类的方法是否存在

    bool method_exists ( mixed $object , string $method_name )

    检查类的方法是否存在于指定的 object中。 

get_class_vars返回由类的默认属性组成的数组(只显示public属性)

    array get_class_vars ( string $class_name )

    返回由类的默认公有属性组成的关联数组,此数组的元素以 varname => value 的形式存在。 

get_parent_class返回对象或类的父类名

is_subclass_of如果此对象是该类的子类,则返回 TRUE

call_user_funcCall the callback given by the first parameter

call_user_func_arrayCall a callback with an array of parameters

 

flectionClass 类报告了一个类的有关信息。 

Reflection::exportExports

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!