The Definitive PHP Style Guide

Last updated:

Introduction

There has certainly been plenty of fisty-cuffs about the recently released "standards" (PSR-1 and PSR-2) by the self-appointed PHP Framework Interoperability Group.

As an alternative (because everyone needs a little competition!) this style guide was created. All the included content has been agreed unanimously by all voting members. All content has been carefully researched so ensure that no-one codes this way. As no-one currently uses any of these techniques they are unbiased and impartial and therefore everyone can agree on these standards!

General rules

Control structures

Classes, methods and functions

Wildcards

How can I get involved?

Seriously? You actually want to get involved in this? If you would like to stay up-to-date with future announcements surrounding these guidelines, or if you have any comments, suggestions or complaints then follow me on twitter @durhamhale or use the hashtag #phpstyleguide.