ReflectionClass::getDocComment

(PHP 5 >= 5.1.0, PHP 7)
Gets doc comments
public string ReflectionClass::getDocComment ( void )

Gets doc comments from a class.

Returns:

The doc comment if it exists, otherwise FALSE

This function is currently not documented; only its argument list is available.

Examples:
ReflectionClass::getDocComment() example
<?php
/** 
* A test class
*
* @param  foo bar
* @return baz
*/
class TestClass { }

$rc = new ReflectionClass('TestClass');
var_dump($rc->getDocComment())
?>

The above example will output:

string(55) "/** 
* A test class
*
* @param  foo bar
* @return baz
*/"
See also:

ReflectionClass::getName() -

doc_php
2016-02-24 16:13:20
Comments
Leave a Comment

Please login to continue.