End of life for PHP 5.6 & 7.0By Nick Fox, June 2018
What does this mean for you and your customers?
Many popular versions of PHP used by your customers are unsupported by PHP.net. At the end of this year, PHP 7.0 (3rd December 2018) & PHP 5.6 (31st December 2018) will also no longer be supported by the community. This means that as security vulnerabilities are discovered, they will not be fixed and your websites will be open to attacks.
Here is how PHP is supported:
- – “Each release branch of PHP is fully supported for two years from its initial stable release. During this period, bugs and security issues that have been reported are fixed and are released in regular point releases”.
- – “After this two year period of active support, each branch is then supported for an additional year for critical security issues only. Releases during this period are made on an as-needed basis: there may be multiple point releases, or none, depending on the number of reports”.
Once the three years of support are completed, the branch reaches its end of life and is no longer supported.”
Currently Supported Versions
However, it’s not all bad news! There are huge benefits to upgrading your PHP version.
PHP 7 is at least 2x faster than PHP 5.6, and PHP 7.3 is reported to be 25% faster that PHP 7.0.
By upgrading and ensuring you are not affected by PHP vulnerabilities you will also benefit from a significant performance boost.
What do I need to do?
The first thing that you should do is ensure your code is compatible with the supported PHP version. If you are using a CMS, such as WordPress, Drupal or Magento, then ensure that you are running the latest version. You can then switch to the latest version of PHP without any issues. ( See notes provided by your CMS vendor to ensure PHP compatibility).
There are also several tools to check that your code is compatible with supported PHP versions.I use phpcs (ttps://github.com/PHPCompatibility/PHPCompatibility.git).
There are however, a few other active projects:
- php7mar – PHP 7 Migration Assistant Report (MAR). (Recommended)
- phan – a static analyzer. PHP 7 checker.
- phpstan – PHP Static Analysis and compatibility check.
- There are also PHPStorm for developers.
Once installed, to check your code’s compatibility with PHP 7.2, you can run something like the following:
- phpcs --runtime-set testVersion 7.2 ./