I am looking for a lightweight PHP prettyprint (beautification) tool. In Netbeans, I can Right-click and select Format to format source code. Is there a text editor with the same capability?

link|improve this question
4  
Format as in fixing indenting and white space, or do you mean syntax highlighting? – iglvzx Dec 23 '11 at 2:07
is my question is stupid? – eureka Dec 23 '11 at 2:08
@iglvzx I means like right-click Format in NetBeans :) – eureka Dec 23 '11 at 2:08
Could you perhaps explain a bit more as to what your aiming for? – Simon Sheehan Dec 23 '11 at 2:08
@eureka Ah. So, the first definition I gave. Thanks for clarifying. – iglvzx Dec 23 '11 at 2:09
show 5 more comments
feedback

closed as not constructive by Joel Coehoorn, random Dec 26 '11 at 2:41

This question is not a good fit to our Q&A format. We expect answers to generally involve facts, references, or specific expertise; this question will likely solicit opinion, debate, arguments, polling, or extended discussion. See the FAQ for guidance on how to improve it.

2 Answers

up vote 5 down vote accepted

You can use Notepad++'s auto-indenter. It is in TextFX-> TextFX Edit->Reindent C++ code.

link|improve this answer
1  
Question is for PHP pretty print... – Devendra D. Chavan Dec 23 '11 at 2:39
2  
Notepad++ cannot tell the difference. Indenting rules are the same. – soandos Dec 23 '11 at 2:42
feedback

Many code beautifiers and prettyprint tools are hosted online. These online tools may be the best, as they are operating system independent. For PHP, some examples are PHPFormatter.com and PrettyPrinter.de. If you are looking for a stand-alone application, phpCodeBeautifier is available for both Windows and Linux.

link|improve this answer
feedback

Not the answer you're looking for? Browse other questions tagged or ask your own question.