Beautify PHP

version 0.5.0, 08.05.2003

Home
Example
Online Demo
Download
Donate
Forum
Change Log
To Do
Links
License
Contact
Copyright
© 2002-2006
Jens Bierkandt
 
Sponsored by:
Online image converter
SourceForge.net Logo

Update: (20.10.2004)

This version has been the last version published for PHP4. A complete rewrite of this tool using PHP5 can be found at http://pear.php.net/package/PHP_Beautifier. If someone wants to continue developing the old version, just drop me a mail. I will try to help you where I can. We also look for help for the new project.

What it does:

This program tries to reformat and beautify PHP source code files automatically. It is a pretty printer for your php source code. The program is Open Source and distributed under the terms of GNU GPL. It is written in PHP and has a web frontend.

Who needs it:

  • people, who get PHP code from other coders and are slightly confused
  • people, who can't read their own PHP code anymore
  • people, who want to share their PHP code

Basic features:

  • automatic indentation of PHP source code according to given number of spaces
  • automatic newlines, if required
  • includes settings for braces according to C or PEAR style
  • can make use of PHPs integrated code highlight option
  • can limit number of chars per line. This will break the code at a space and outputs the rest on the next line with an additional indent. (I used this to reformat my code to put it in a LATEX document. This PHP code normally can't be executed anymore, it is only useful for printout.)
  • turn off and on beautifying by inserting "// NO_BEAUTIFY" or "// BEAUTIFY" in source code