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


Tools that are included in the package are:

  • parse-php
  • parse-php4, parse-php5
  • pp-php
  • pp-php4, pp-php5
  • eval-php

Project Info


  • Eric Bouwers
  • Martin Bravenboer

Feedback and bug reports:

  • Armijn Hemel
  • Tim Hemel
  • Eelco Visser


  • Google Summer of Code 2006


  • PHP-Front is LGPL (GNU Lesser General Public License) software.

Projects that use PHP-Front

Revision: r1.7 - 10 Mar 2007 - 16:46 - MartinBravenboer
PHP > PhpFront
Copyright © 1999-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback