I recently went to PHP UK Conference 2015, The conference was all about getting the most out of PHP, using the latest improvements, collaborating to a recommended standard and optimising processes.
Resulting from this we are implementing changes in how we work internally and the infrastructure we use. Internally we will be doing regular code reviews, this ensured the code we produce for our customers are at the highest standard and compatible with recommended best practices.
We have multiple servers, some of which are using PHP 5.3 as of today they will be upgraded to PHP 5.6 the latest stable release of PHP, All customers will be upgraded to PHP 7 when it comes out at the end of the year.
The reason for the upgrades, 5.3 has passed it’s end of life, PHP 5.4 will be end of life in September, this means they will no longer be supported and security patches will stop being released. Upgrading to 5.6 means we will be at the other end of the spectrum and only a small percent of web hosts offer PHP 5.6 The One Point being one of them. The graph below shows the usage for versions.
Upgrading the 5.6 makes a lot of sense the graph below represents a php script running on different version on PHP and the time in seconds it took to complete. The time differences from 5.3 to 5.6 are significant, even more so when you take into account multiple processes/users.
In addition to upgrading our servers and performing code reviews were are also incorporating a new coding standard namely: PSR-2 (PHP Standards Recommendation) http://www.php-fig.org/psr/psr-2/
The intent of this guide is to reduce cognitive friction when scanning code from different authors. It does so by enumerating a shared set of rules and expectations about how to format PHP code.
The style rules herein are derived from commonalities among the various member projects. When various authors collaborate across multiple projects, it helps to have one set of guidelines to be used among all those projects. Thus, the benefit of this guide is not in the rules themselves, but in the sharing of those rules.