debugging - PHP - print all properties of an object -
I have an unknown object in the php page
How can I print / echo it out? So, I can see what happens to the qualities / values?
What about the tasks? Is there any way to work any object?
& lt ;? Php var_dump obj)? & Gt;
or
& lt ;? Php print_r (obj)? & Gt;
These are the same things that you also use for arrays.
They will show the protected and private properties of the object with PHP 5. Members of static classes will not be shown according to manual.
If you can know member methods that you can use:
$ class_methods = get_class_methods ('myclass'); // or $ class_methods = get_class_methods (new myclass ()); Foreign currency ($ class_methods $ as method_name) {resonant "$ method_name
}
Related Content:
& lt; - For example name
Comments
Post a Comment