Apply Source Format

Posted on 2004-10-13
Last Modified: 2008-03-10
I have been looking all of the internet, for a program that will format php code into the right standard. IE

if(something){dothis;}else{do this;}

   Do this;
   Do this;

Macromedia's Dreamweaver has this option but its only for html code. I doens't touch the php.
Any Ideas??
Question by:ocsurf
  • 3
LVL 27

Expert Comment

ID: 12298525
Take a look at this class from pear:
LVL 27

Expert Comment

ID: 12298556
LVL 27

Expert Comment

ID: 12298655
There is a source code "beautifier" program here also, but this is not free:

It does however support a range of languages including php.

Shareware download:

Accepted Solution

_GeG_ earned 500 total points
ID: 12306022
and another one, i think it is free:

afaik you can customize the output, ie wether you want the opening { in the same line or on the next,...

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question