I am trying to find a best way to get all the private, public, static, protected methods in a file.... what would be the best way to do it. currently when I do file_get_contents it dumps the whole file but I need some kind of regex that will give me methods only
$filecontent = file_get_contents($fn->getPath()."/".$fn->getFilename());
I am not sure if I can use this
preg_match("/private function | protected function | public function | public static function/") etc etc
if there is a better way I would like to know about that as well