Betty_S Posted January 25, 2007 Share Posted January 25, 2007 Hi everyoneHow can I expose the object's method and properties?Is there a php command or keyword which expose the object's method and properties?For example: print_r arr[0]; will print on the screen all of the array (the index or keys and the content). I'm look for somting simler that prints on the screen all of the object's method and properties.So, who can I print all of the object's 'tree' of functions and variables?Thanks Quote Link to comment Share on other sites More sharing options...
neylitalo Posted January 25, 2007 Share Posted January 25, 2007 To get the properties:[code]get_object_vars($object);get_class_vars($className);[/code]To get the methods:[code]get_class_methods($className);[/code] Quote Link to comment Share on other sites More sharing options...
448191 Posted January 25, 2007 Share Posted January 25, 2007 [code]<?php//PHP5Reflection::export($obj);?>[/code] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.