Why Development Teams Aren’t Upgrading to PHP 7 – and Why They Should
In February, I put out a Twitter poll to get a feel for the main reasons folks are not upgrading to PHP version 7. With the end of support for PHP version 5.6 (the final version in the 5 series) passing a few months ago, I felt the question was relevant given that so many sites are still running on these unsupported versions.
Though many companies and developers have embraced PHP version 7+, there is still a significant number of web-based applications running on PHP 5-ish.
As you can see below, according to Packagist logs, the footprint of those still remaining on PHP 5 is around 21% overall. Of course, these results are subjective because there are still many companies and applications not leveraging more modern development practices with Composer and Packagist, and they simply are not represented in these stats.
Along those lines, according to W3Techs, PHP version 5 still makes up around 70% of those using PHP as of March 2019. Meaning, the vast majority of PHP-based sites are no longer supported by bug fixes or security updates.
We hope to see this change as WordPress and other large applications and projects begin to push toward PHP 7.
While the recent Twitter poll I conducted cannot be thought of as conclusive, I believe statistically it is a good enough sampling to make some educated deductions.
Here are my thoughts/conclusions, based on both the poll and conversations I've had with others.
For many companies, the cost may simply seem too high to upgrade. The perception is they will need to rewrite their entire codebase and put many projects on hold in the process. Meaning, if you add the cost of their developer staff and the loss of customers waiting for new features while the upgrade happens, it is mind boggling for business people to fathom.
This is unfortunate because often the upgrade is not as major as perceived. In most cases, the cost to upgrade is actually quite minimal, and these companies suffer huge losses by not taking advantage of PHP version 7 improvements. See here for more information.
What we have found in our Professional Services Consulting is that many development teams simply lack the knowledge of how to measure the effort of a PHP 7 migration, or have become complacent in their current flow.
Around 25% of developers, according to the poll results, admit to avoiding the upgrade to PHP version 7 due to laziness. They are reluctant to rock the boat and introduce more work into their daily lives.
Please don't be too harsh on these folks. Upon further investigation, we found that often it was not true laziness that prompted the response. Instead, it was either fear of confrontation with employers, or not fully understanding the effort involved, that drove them to avoid the task. As such, they have labeled themselves as "lazy," which is not entirely accurate.
Of those that indicated there were other reasons, we found a very mixed amount of responses. Some have moved on to other technologies and avoided the upgrade, while others have drawn a line in the sand and said they will simply not upgrade.
However, a vast majority of "other" respondents really desired to share a response that led to blaming the company, or poor communication within their teams, for lack of innovation.
Lack of Training
Though the Twitter poll showed that "Not sure how" was only 10% of respondents, we found that many of those blaming their company or laziness were in fact suffering from a lack of training. So, this number should likely be much higher than the mere 10% initially recorded.
In fact, of those that said their companies were to blame for not upgrading, we found that almost 75% were caused by the company or the developers not understanding the full picture.
Likewise, of those selecting "laziness," almost 60% were avoiding the pain of investigation... which is because they didn't know what to do or how to do it.
In the same vein, the "other" responses were also found to be training or knowledge related.
Upon digging a bit deeper, it seems that lack of training should have been closer to 80% of the “enlightened” responses.
While the Twitter poll was not 100% conclusive, statistically it is felt that a larger sampling of responses would yield similar results.
Most respondents have indicated that lack of training, or not fully understanding the processes to measure an upgrade, were the primary reasons behind remaining on an unsupported version of PHP.
It is felt that through company supported training, or possibly by bringing in specialized outside talent or consulting, many of the reasons could be eliminated and allow companies to upgrade easier. Companies would then be able to reap the financial and performance benefits of PHP version 7+.