[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Apply Source Format

Posted on 2004-10-13
4
Medium Priority
?
467 Views
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

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

after
if(something){
   Do this;
}else{
   Do this;
}

Macromedia's Dreamweaver has this option but its only for html code. I doens't touch the php.
Any Ideas??
0
Comment
Question by:ocsurf
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 27

Expert Comment

by:Diablo84
ID: 12298525
Take a look at this class from pear:

http://pear.php.net/package/PHP_Beautifier/
0
 
LVL 27

Expert Comment

by:Diablo84
ID: 12298556
0
 
LVL 27

Expert Comment

by:Diablo84
ID: 12298655
There is a source code "beautifier" program here also, but this is not free: http://www.textrush.com/formatx.htm

It does however support a range of languages including php.

Shareware download: http://www.tucows.com/preview/355268.html
0
 
LVL 9

Accepted Solution

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

http://www.waterproof.fr/products/phpCodeBeautifier/

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

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
This article discusses how to implement server side field validation and display customized error messages to the client.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses

656 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