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 Link to comment https://forums.phpfreaks.com/topic/35726-how-can-i-expose-the-objects-method-and-properties/ 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] Link to comment https://forums.phpfreaks.com/topic/35726-how-can-i-expose-the-objects-method-and-properties/#findComment-169295 Share on other sites More sharing options...
448191 Posted January 25, 2007 Share Posted January 25, 2007 [code]<?php//PHP5Reflection::export($obj);?>[/code] Link to comment https://forums.phpfreaks.com/topic/35726-how-can-i-expose-the-objects-method-and-properties/#findComment-169310 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.