PHP-front: PHP4/5 static analysis


PHP-front: PHP4/5 syntax definition, parser, and pretty-printer

PHP-front is a package you can use to generate, analyse, or transform PHP code. It contains a handcrafted SDF grammar for PHP, a handcrafted pretty printer, an extensive library for reflecting over PHP code, and support for evaluation of PHP.

Some of the unique features of PHP-front are:

* Modular and extensible syntax definition for PHP for versions 4 and 5
* Option to preserve comments
* Pretty printer
* Automatic inclusion of files
* PHP-specific, common traversals
* Reflection support
* Conversion of abstract syntax tree to XML possible

This is part of a set of interesting tools for static analysis of PHP code. Unfortunately implemented in a weird language and not easy to install.

Related Posts