PHP versions usage
Supported PHP versions provides some insights on which version you should pick for your project.
Currently the recommended version to use in PHP is the latest PHP 7, however the statistic of PHP version usage on servers is kind of shocking.
Thanks to the research of PHP versions usage we have some data to work with. The majority of PHP servers still has PHP 5.3 installed and also old versions of PHP 5.2 and less are still used.
PHP 5.3 version has reached EOL (end of life) in august, 2014, PHP version 5.5 has reached EOL (end of life) in july, 2016. For more information about unsupported EOL PHP versions visit PHP.net 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 many times a delicate thing, 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 their PHP on servers.
Why is upgrading PHP important?
- New great features
- Better performance (PHP 7 has gained huge performance improvement)
- Better coding possibilities
- Future preparation for less painful upgrades of your application
- Open source libraries must now support old versions because there are still many old versions used (wide availability of developer’s code is important)
What to do?
- Ask for better environment - server with latest stable PHP version
- Upgrade to the latest PHP version and refactor old code
- Push the miniminum version of PHP in composer.json files to newer PHP versions
- Make maintainability strategy for your projects to upgrade server software together with PHP on its regular basis.
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 the contributors.