Get methods of a class

DescriptionPHP snippet by - 10/08/10

Use this code to loop through all of the method names of a php class. Simply replace the argument in the function with the classname you are interested in.

Tags ,

<?php
$class_methods = get_class_methods('PUTCLASSNAMEHERE');

foreach ($class_methods as $method_name) {
    echo "$method_name<br>";
}
?>
  • Share
Submitted by: Adam J Nowak
http://hyperspatial.com

Comments and Feedback