Skip to main content

Coding Style

By David Mytton

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!

Integromat Tower Ad