title: Parsing and Printing PHP Code
body: <p>Preferably I'd like a solution which allows me to parse PHP <em>from PHP</em>, but any solution is welcome. (As an example of what I'm looking for, Ruby has the - amongst others - <code>ruby_parser</code> gem.)</p>
  
  <hr>
  
  <p><strong>Edit:</strong></p>
  
  <p>I am looking to generate abstract syntax trees of some kind, from PHP code. (And unless I am mistaken, I am fully aware of the existence and behaviour of the <code>eval</code> function.)</p>
  
  <p>What are the options (if any) for parsing PHP code to some sort of abstract syntax tree? And what are the options for turning these syntax trees back into (readable) PHP code?</p>