Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|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

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

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

2 Answers

up vote 5 down vote accepted

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

share|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
add comment

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.

share|improve this answer
add comment

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