Modified Code Beautifier

|

Modified Code Beautifier: a script to make a source PHP code more readable.

This script has been 'borrowed' (or should I say stolen? ;) ) and modified from the one at the url http://www.tote-taste.de/X-Project/beautify/.

As the original author write: "This tool is designed to beautify PHP code, applying most of the PEAR standard requirements to it. It can even process really scrambled scripts, e.g. all code in one line, and thus may
help you to get scripts into a more readable form".

HOW TO INSTALL

  • unpack the zip file content on your web server
  • surf to the corresponding url

UTILIZATION

  • select the file to "beautify" from your local drive
  • optionally select the desidered number of space characters
  • click on 'generate file' and save

Note: the end of line characters are unix like, so you should use a good text editor that recognise this format e.g. vim, pspad. Notepad shows the whole file on one line!

Differnces from the original

  • take only a file as input, doesn't have a text field
  • insert a 'end of line' before each '{' char
  • generate an output file instead of showing it on the browser
AttachmentSize
Code beautifier alias codeparser v1.0.zip3.27 KB

Strings

If you have a string such as

$var="something{$cnt}somethingelse";

You end up with

$var="something{
$cnt}
somethingelse";