English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Basic PHP Tutorial

Advanced PHP Tutorial

PHP & MySQL

PHP Reference Manual

PHP Class/Object functions

These functions allow you to obtain information about classes and instance objects. You can get the name of the class to which the object belongs and its member properties and methods.

Installation

These functions can be used without installation. They are part of the PHP core.

Function list

PHP version-Indicates the earliest PHP version that supports this function.

NumberFunction name
Function descriptionPHP version
1

call_user_method_array()

Call a user method with an array of parameters[Deprecated]

4
2

call_user_method()

Call a user method for a specific object[Deprecated]

4
3class_exists()Check if a class has been defined4
4get_class_methods()Get the names of class methods4
5get_class_vars()Get the default properties of a class4
6get_class()Return the name of the class of an object4
7get_declared_classes()Return an array with defined class names4
8get_declared_interfaces()Return an array of all declared interfaces5
9get_object_vars()Get the properties of a given object4
10get_parent_class()Retrieve the name of the parent class of an object or class4
11interface_exists()Check if an interface has been defined5
12is_a()Check if an object belongs to this class or has this class as one of its parent objects4
13is_subclass_of ()Check if an object has this class as one of its parent classes4
14method_exists()Check if a class method exists4
15property_exists()Check if an object or class has a property5
16__autoload()Attempt to load an undefined class5
17class_alias()Create an alias for a class5
18get_called_class()The name of the class with late static binding ("Late Static Binding")5
19get_declared_traits()Return an array of all defined traits5
20trait_exists()Check if the specified trait exists.5