Skip to content

Instantly share code, notes, and snippets.

@masakielastic
Created February 19, 2009 11:59
Show Gist options
  • Save masakielastic/66883 to your computer and use it in GitHub Desktop.
Save masakielastic/66883 to your computer and use it in GitHub Desktop.
//show the list of available SPL classes
php -r 'print_r(spl_classes());'
//show the list of defined class
php -r 'print_r(get_declared_classes());'
//show the list of methods of class Example
php -r 'print_r(get_class_methods(Example));'
//show the list of properties of class Example
php -r 'print_r(get_class_vars(Example));'
//show the list of methods and properties of class Example
php --rc Example
<?php
require_once 'Zend/Loader/Autoloader.php';
Zend_Loader_Autoloader::getInstance();
$r = new Zend_Reflection_Class($class);
foreach ($r->getMethods() as $method)
{
echo $method->name."\n";
}
$r = new Zend_Reflection_Method($class, $method);
echo $r->getBody();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment