Example of get_object_vars () method usage in php, phpget_object_vars. Example of get_object_vars () method usage in php. phpget_object_vars This article analyzes the usage of get_object_vars () method in php. Share it with you for your reference. The specific analysis is as follows: example of get_object_vars () method usage in php, phpget_object_vars
This article analyzes the usage of the get_object_vars () method in php. Share it with you for your reference. The specific analysis is as follows:
Syntax: get_object_var ($ object), returns an array. Obtains the attributes of $ object to form an array.
Instance:
<? Phpclass person {public $ name = ""; public $ age = 25; public $ birth;} $ p = new person (); print_r (get_object_vars ($ p);?>
Output result:
Array ([name] => Wang Mei [age] => 25 [birth] =>)
I hope this article will help you with php programming.
Examples of usage of lift () method: phpget_object_vars This article analyzes the usage of the get_object_vars () method in php. Share it with you for your reference. The specific analysis is as follows: language...