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 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 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 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
- Better coding possibilities.
- Future preparation for less painful upgrades of your application.
- 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
- Create a maintainability strategy for your projects to upgrade server
software together with PHP on a regular basis.