问题
Is there something like the "phpCodeBeautifier" from waterproof that is open source?
回答1:
The best tool I know to reformat PHP code is the PHP_Beautifier PEAR package, which is both free (open source) and free (costs no money).
It's a bit complicated, has a lot of options, and is maybe a bit slow, but does really good job on messy code-source.
回答2:
Open source:
http://www.bierkandt.org/beautify/
Commercial:
http://www.sourceformat.com/php-formatter.htm
回答3:
For something quick you might want to consider
http://www.prettyprinter.de/
来源:https://stackoverflow.com/questions/1458401/looking-for-a-php-indentation-tool