PHP Code-Beautifier Tool

Posted by Tim Koschützki, on May 01, 2007 - in Coding Techniques & Tools » Tools

Today I discovered a good tool for beautifying existing PHP Code. It works via a web interface. You can either upload a script or directly input it. The code is beautified according to the PHP PEAR Standard Requirements. It does not change or debug your code in any way. What it does is the following:

* Tries to set missing curly braces around single conditional statements. This may not work in all situations.
* Indents with four spaces.
* Uses "one true brace" style in function definitions.
* Sets one space between control keyword and condition.
* Removes space between function calls, parenthesis and beginning of argument list.

Nice tool!

You can download it here.