--TEST-- Bug #71767 (ReflectionMethod::getDocComment returns the wrong comment) --FILE-- null; $reflectionFunction = new ReflectionFunction('foo'); $reflectionClass = new ReflectionClass(Foo::class); $reflectionClosure = new ReflectionFunction($func); $reflectionArrowFn = new ReflectionFunction($func2); echo $reflectionFunction->getDocComment() . PHP_EOL; echo $reflectionClass->getMethod('bar')->getDocComment() . PHP_EOL; echo $reflectionClosure->getDocComment() . PHP_EOL; echo $reflectionArrowFn->getDocComment() . PHP_EOL; echo "Done\n"; ?> --EXPECT-- /** Correct docblock */ /** Correct docblock */ /** Correct docblock */ /** Correct docblock */ Done