getName(); } /** * Tests the getDocComment() method * * @param array $ray * @param int $zero * @return string * @specialtag */ protected function testfunctionWithCamelCase(array $ray, $zero = 0) { return "bla"; } } //TestClassForTestsWithReflection ends here. //create ReflectionClass $class = new ReflectionClass("TestClassForTestsWithReflection"); //print class name echo "Information about: " . $class->name . "\n"; //getDocs for all methods foreach($class->getMethods() as $key=>$method) { var_dump($method->name, $method->getDocComment()); echo "\n"; } //getDocs for all properties foreach($class->getProperties() as $key=>$property) { var_dump($property->name, $property->getDocComment()); echo "\n"; } ?>