Home >Backend Development >PHP Tutorial >PHP, ASP.JAVA, JAVA code formatting tool arrangement_PHP tutorial
PHP code formatting tool http://www.waterproof.fr/products/phpCodeBeautifier/
I recently modified a code that has no indentation at all. Use this to format it.
Equivalent to the previous indent of c
By the way, write other languages
c, c++ c# ==> indent Astyle
java ==> astyle Jalopy Jacobe ImportScrbber
php ==> ; phpCodeBeautifier
perl ==> perlTidy
python ==> Pydent
asp ==> VBSBeaut
Tool name | Applicable languages | Introduction | Installation/Usage | ||||||||||||||||||||||||||||
indent | c | indent is synonymous with code beautification tools | indent is a standard tool that comes with gcc,
|
||||||||||||||||||||||||||||
perltidy | perl | perltidy itself is also written in perl | After downloading: perl Makefile.PL;make;make install perltidy [ options ] file1 file2 file3 ... | TR>
||||||||||||||||||||||||||||
astyle | c c++ java (php) | A fast C/C++/Java source code beautification tool. Astyle is better than indent in that it has many complete sets of style definitions: ansi java linux... There is no need to remember complex indentation specific options. | After downloading the source code and unpacking it, make, generate astyle executable fileastyle [options] < Original > Beautifiedastyle [options] Foo.cpp Bar.cpp [ ...]astyle --style=ansi *.cppI have tried using it to format PHP programs and it works well (of course it is pure PHP code that is not mixed with HTML code). | ||||||||||||||||||||||||||||
jalopy | java | A powerful JAVA code formatting tool. In addition to the standard interface, the command line tool can also be used as a plug-in for ANT JBUILDER ECLIPSE JDEVELOPER and other tools, and provides API | Download from http://prdownloads.sourceforge.net/jalopy/and refer to the corresponding installation documentation | ||||||||||||||||||||||||||||
pydent | python | pythius includes 2 tools: pydent: code indentation toolpystat: code statistics tool | After downloading and unpacking the source code:Run "python setup.py build"Run "python setup.py install" | ||||||||||||||||||||||||||||
htmltidy | html/xml | HTML code debugging tool can help your HTML code better comply with W3C specifications. It is now called tidy because it is not only used for HTML, but also for XHTML XML. formatting. But JSP is not suitable for code beautification of embedded scripts such as ASP PHP JSP | After downloading the source code, make generates the tidy executable file: tidy file1 file2...Note: Use the -raw option for pages containing Chinese
tidy.exe -raw -imuq -wrap 132 -f %f.err %f
option description: -raw: Do not modify Chinese characters (output values above 127 without conversion to entities) -i indend Default HTML is indented by 2 spaces -m Overwrite the original file-u forces all HTML tags to be capitalized (this can be omitted) -wrap forces a newline if the page code width is greater than 132 lines -f %f.err outputs the error to the "corresponding file name.err" file HTMLTIDY supports XML format beautification: tidy -xml -imq web.xmltidy -xml -imq build.xml
|