I am aware of PHP ReflectionClass to get doc comments from PHP scripts. Now I have come across these hundreds of old PHP scripts that are not using classes but only simple public functions. If I am right, ReflectionClass cannot be used here? My goal is to extract each doc comments. E.g. test1.php
contains the following lines:
<?php
/**
* some main comments here
*/
...some php lines here...
/**
* function comment
* Blah blah
*/
function foo()
{
...some php lines here...
}
...and more functions below each with comments
?>
So my desired ouput would be a table like:
--------------------------------------------------
| Filename | FUNCTION | Comment |
--------------------------------------------------
| test1.php | | some main comments here |
| test1.php | foo() | function comment |
| | | Blah Blah |