PHP versions usage

Supported PHP versions provides some insights on which version you should pick for your project.

Currently, the recommended version of PHP to use is the latest PHP 7, but the statistic of PHP version usage on servers is kind of shocking.

Thanks to the research of PHP version usage, we have some data to work with. The majority of PHP servers still have PHP 5.3 installed, and old versions of PHP 5.2, although less so, are still also used.

PHP version usage, october 2014

PHP 5.3 reached EoL (End of Life) in August 2014, and PHP 5.5 reached EoL (End of Life) in July 2016. For more information about unsupported EoL PHP versions, visit unsupported branches.

PHP 5.6.0 currently has active support, but that will expire in December 2017.

PHP version requirements in open source

Having wide availability of the software is important for open source projects. Increasing minimum version requirement is in many cases a delicate issue, but more and more projects are requiring more or less the latest versions already. Enforcing later versions is a good thing to encourage users to upgrade the PHP used on their servers.

Why is upgrading PHP important?

  • New great features.
  • Better performance (PHP 7 has huge performance improvements over previous versions).
  • Better coding possibilities.
  • Future preparation for less painful upgrades of your application.
  • Security.
  • Without upgrading, open source libraries are forced to support older versions due to there being many older versions still in use (wide availability of developer's code is important).

What to do?

  • Ask for better environment: A server with the latest stable PHP version installed and operable.
  • Upgrade to the latest PHP version and refactor old code.
  • Push the miniminum version of PHP in composer.json files to newer PHP versions.
  • Create a maintainability strategy for your projects to upgrade server software together with PHP on a regular basis.

See also

Found a typo? Something wrong with this content?

Just fork and edit it.

Content of this work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license. Code snippets in examples are published under the CC0 1.0 Universal (CC0 1.0). Thanks to all contributors.