- printf: documentation ( source)
<?php
class MetaReflectionClass extends \ReflectionClass
{
public function getMethods($blah = \ReflectionMethod::IS_PRIVATE)
{
return call_user_func_array(
['parent', 'getMethods'],
func_get_args()
);
}
}
$mrc = new MetaReflectionClass('DateTime');
printf("Number of methods (no filter): %s\n", count($mrc->getMethods()));
printf("Number of static methods: %s\n", count($mrc->getMethods(\ReflectionMethod::IS_STATIC)));