I\'m building a unit testing framework for PHP and I was curious if there is a way to get a list of an objects methods which excludes the parent class\'s methods. So g
Use ReflectionClass, for example:
$f = new ReflectionClass('Bar'); $methods = array(); foreach ($f->getMethods() as $m) { if ($m->class == 'Bar') { $methods[] = $m->name; } } print_r($methods);