Preferably I\'d like a solution which allows me to parse PHP from PHP, but any solution is welcome. (As an example of what I\'m looking for, Ruby has the - amongst othe
Edit: this answer was written before @pepjin edited their question and changed the requirements. See comments for context.
eval() to execute PHP code from within PHP.
To analyse PHP code for your own micro language etc you can use the PHP Tokenizer. List of parser tokens: http://www.php.net/manual/en/tokens.php