Is there a way to get user-defined php functions, variables, constants from a php file? Following functions are not the best way to do so because they get all decalred funct
You probably want to try the PHP Tokenizer.
http://www.php.net/manual/en/ref.tokenizer.php
From an external script: