title: Get functions and classes defined in file?
body: <p>I'm looping over all the files in a directory. Now I want to get all the functions and classes defined in each of them. From there, I can examine them further using the <a href="http://www.php.net/manual/en/class.reflectionclass.php" rel="nofollow">ReflectionClass</a>. I can't figure out how to get all the functions and classes defined in a file though.</p>
  
  <p><a href="http://www.php.net/manual/en/class.reflectionextension.php" rel="nofollow">ReflectionExtension</a> looks the closest to what I want, except my files aren't part of an extension. Is there some class or function I'm overlooking?</p>