You are hereA PHP Discovery: perltidy, meet phptidy

A PHP Discovery: perltidy, meet phptidy


By Matt - Posted on 10 May 2009

It seems that the many people who have been looking for a php beautifier now have a very nicely done perltidy work-alike in Magnus Rosenbaum’s new phptidy program.
It does have a few user-friendliness issues- just make sure your PHP is compiled with the tokenizer built in or it will not work and it will not tell you why it doesn’t work. Also edit the phptidy.php script to change some default variables or the javadoc style comments it so nicely auto-generates may have the author name in them wrong. After that, if you like the default formatting you’re done.
http://cmr.cx/phptidy/
I also tried PHP Beautifier but it created code that was way too compact to read clearly by default and required the use of specific filters to alter these spacing choices. I found the default settings of phptidy to be just my style and I am sticking with that for now.
Try also:
http://beautifyphp.sourceforge.net/
Both of the projects could use a little documentation, but if you read the source you’ll figure it out pretty quick.

There is a complete reference for PHP_Beautifier script and command line use on http://beautifyphp.sourceforge.net/docs/PHP_Beautifier/tutorial_PHP_Beautifier.howtouse.pkg.html

Create Live Bookmark

Syndicate content

Recent comments

Latest images