Skip to content
Coupons 8

You have not saved any offers or providers yet. Tap the bookmark on an offer or choose Save on a provider profile.

    Monitoring free

    Discontinuing old PHP versions – what does it mean for compatibility?

    Author: HOSTTEST Editorial Go to comments

    End of support for old PHP versionsThe scripting language PHP: Hypertext Preprocessor (PHP) was developed specifically to create and conveniently programme dynamic websites, and has been the dominant standard for web applications since the turn of the millennium at the latest. Like all other languages, it is constantly evolving, with the developers responsible for it fixing potential or already discovered security vulnerabilities, introducing new features and improving efficiency and performance. One specific consequence is that an outdated PHP version is discontinued after a certain period, allowing resources to be focused on maintaining current versions and developing new ones. For users, this means they need to check the compatibility of their software with the new version to avoid problems that could result in a website failing completely.

    How does PHP development and adoption progress?

    Compared with other programming languages, PHP has a relatively short development cycle and does not offer selected versions with long-term support (LTS). Instead, the developers officially support each branch for two years after its release, with this period applying only to the preceding PHP version within a branch. The team then releases further updates for an additional year if security-critical vulnerabilities emerge during that time and require a rapid response. Those interested can find a precise list of end-of-life dates — when all support ends — on the official PHP website.

    Customers using web hosting are dependent on their provider when it comes to choosing their PHP version, as the provider switches it globally for all its customers. Many hosting providers offer a choice of the latest two or three versions and give customers a few weeks’ notice before switching off the oldest one. The same applies to a managed server, although users can often state their preferences and set priorities in this case. With a virtual or dedicated server, on the other hand, users are responsible for switching versions. However, this usually happens largely automatically on Linux when the operating system is updated. PHP settings can also be made more secure through PHP hardening.

    What should you consider when it comes to compatibility between different PHP versions?

    When updating a minor version – for example, from X.0 to X.1 – there are usually only minor changes, which have no direct effect on the code. The picture is different with larger version jumps, such as from 7.X to PHP 8.0, as redundant, insecure and unnecessary functions are removed, and some are also changed in terms of how they work and their syntax. Problems caused by a lack of compatibility between the two versions are therefore rare, but can occur, particularly with older, unmaintained versions of content management systems (CMSs) such as WordPress, TYPO3 and Joomla, or e-commerce platforms such as Shopware. In the latter case in particular, it is strongly recommended that you update as soon as possible to avoid security vulnerabilities and other risks.

    How can you check compatibility with a new PHP version?

    In theory, compatibility between an old and a new PHP version could of course be established through a thorough review of the code, taking into account the changes listed in a changelog. However, since a CMS such as Joomla, WordPress, Shopware or TYPO3 consists of hundreds of scripts and sometimes more than 100,000 lines of code, this approach is just as time-consuming as it is inefficient. In practice, the preferred method is therefore to use a suitable test environment that matches the production system as closely as possible in its setup, while omitting security- and data-sensitive details such as customers’ personal information.

    For commercially used websites, it is therefore generally advisable to run an identical installation, for example by cloning the base system, on a basic VPS. You can use it to carry out tasks such as updates and investigate any potential problems without putting a live website at risk. If difficulties arise, you can investigate and resolve them within a sufficient timeframe without taking the website offline. Your own PHP editor can also help you identify problems.

    Photo: Dok Sev on Pixabay

    Tags for this article

    Write a comment

    More interesting articles