PHP report: Majority of deployments use versions that are out of support

PHP report: Majority of deployments use versions that are out of support

Zend by Perforce has published its latest PHP Landscape Report, showing that PHP 7.4 is the most used version, with 54 percent of respondents deploying it in production, despite it going out of support in November last year.

The survey of 651 IT professionals, over half of whom described themselves as developers, showed that “teams using end of life PHP versions represented 61.9 percent of all responses,” taking into account even older versions. Only 46 percent use PHP 8.1. PHP 8.2 was released in December 2022 but does not show up in this survey. Note that figures sum to more than 100 percent because of organizations using multiple different versions.

Out of support, in this context, means that the official PHP community will no longer fix bugs or security issues. The support policy, is that each release branch is supported for two years, followed by a third year for critical security issues only. 7.4 appears on this table with the note “Users of this release should upgrade as soon as possible, as they may be exposed to unpatched security vulnerabilities.”

That said, it is common for Linux distributions to support old versions of PHP for longer. Red Hat, for example, shows PHP 7.4 as supported on RHEL 8 until May 2029. It depends though: Microsoft said that users of PHP on its Azure App Service were out of support at the same time as the community end of life.

Upgrading may not be trivial. A lengthy list of breaking changes for 8.0 shows many reasons why code might no longer run as expected, or fail in subtle ways in certain conditions.

Respondents to the new survey cited refactoring as the most time-consuming part of an upgrade, followed by testing, infrastructure provisioning, planning, and compliance renewal.

According to the survey, PHP is more often deployed on cloud platforms than on-premises, with 46 percent deploying to Amazon Web Services (AWS), ahead of Google Cloud Platform (GCP) at 19.5 percent, Digital Ocean at 17.2 percent, and Azure trailing with 14.2 percent. 36.8 percent deploy on-premises.

Containerization is also a trend, with 57.5 percent of respondents using it, up from 30 percent in 2022.

How is PHP doing overall? “Our respondents rated PHP’s ease of learning highly, as well as their overall enjoyment working with the language,” said Zend product manager Matthew Weier O’Phinney. The statistics for overall PHP usage remain extraordinary with W3Techs reporting that “PHP is used by 77.7 percent of all the websites whose server-side programming language we know.” That said, this figure is wildly distorted by the popularity of WordPress and other PHP-based content management systems. In StackOverflow’s survey, PHP declined a little from 21.98 percent in 2021 to 20.87 percent in 2022. The language cannot be described as fashionable, being old-school server-side code. It also happens to be reliable, lightweight, well documented, and in most cases fast enough, so while all those things remain true we can expect it to continue to be popular.

The full report is here.