Programming
Article
By David Mytton

Coding Style

By David Mytton
Help us help you! You'll get a... FREE 6-Month Subscription to SitePoint Premium Plus you'll go in the draw to WIN a new Macbook SitePoint 2017 Survey Yes, let's Do this It only takes 5 min

Last year, I wrote an article on Coding Standards. That is all very well with your own work, but what happens when you are using code from another programmer who uses a different style from your own? The answer is phpCodeBeautifier.

Although this is an old (2003) app, I have found it useful at least once. Basically, you set a number of options in response to statements about how you want your code to look, and then run it on your file(s) and it will change the code to match your style. This means you can convert any PHP code from any style of coding to your preferred style.

For example, you can change brace styles (on the same line or on a new line), add spaces after brackets and change comment styles.

The best thing is that it is completely free and comes with GUI and command line versions.

Download here and view the manual here.

Do you use a tool, script or library in PHP that you think would be worth me blogging about? Let me know!

Login or Create Account to Comment
Login Create Account
Recommended
Sponsors
Get the most important and interesting stories in tech. Straight to your inbox, daily.Is it good?