PHP 8.5.0 Alpha 4 available for testing

Voting

: six minus two?
(Example: nine)

The Note You're Voting On

gabe at fijiwebdesign dot com
10 years ago
You can also get the docblock definitions for the defined methods of a class as such:

<?php
/**
* This is an Example class
*/
class Example
{
/**
* This is an example function
*/
public function fn()
{
// void
}
}

$reflector = new ReflectionClass('Example');

// to get the Class DocBlock
echo $reflector->getDocComment()

// to get the Method DocBlock
$reflector->getMethod('fn')->getDocComment();

?>

<< Back to user notes page

To Top