Different web hosting companies support different PHP versions – which can have a major impact on the operation of your website. While most web hosts make an effort to support the latest or recent PHP versions, this isn't always the case.
In this article, I have compiled a comparison of some popular web hosting companies and the PHP versions they currently support. Keep in mind though – these details may change over time as PHP continues to evolve and hosting providers update their supported versions.
The Highest PHP Versions Supported at Different Hosting Services
|Web Host||PHP Version by Default|
What is PHP?
PHP is an open-source scripting language widely used in web development. People use PHP to do more complex tasks for their websites, such as generating dynamic web page content, interacting with databases, or sending and receiving cookies.
If you're using a content management system like WordPress or Drupal, or an e-commerce platform like PrestaShop, you have already been using PHP for your site as those platforms are all built on PHP.
In the context of web hosting, the PHP version your host supports can have significant implications for your website. It affects your website's security, compatibility with certain software, and performance.
Understanding PHP Versions
PHP versions are similar to versions of any other software – they mark stages of development, with each release providing new features, enhancements, and improvements in performance and security. Since its inception, PHP has gone through several version updates (currently we are at PHP 8.2.6).
Here are the recent few PHP versions and their notable features:
- PHP 7.4: The fourth version of PHP 7 (PHP 7.4.0) was released in November 2019. This version introduced arrow functions, preloading, and typed properties. Arrow functions provide a more concise syntax for anonymous functions.
- PHP 8.0: First released in November 2020, PHP 8.0 brought in several major updates, including the JIT (Just In Time) compiler, which significantly improves the performance of PHP scripts. It also introduced Union Types, Named Arguments, Attributes, and the ‘match' expression. At this time of writing, the latest version of
Differences between PHP versions not only lie in features but also in performance. For example, PHP 7.0 was reported to perform 400% better compared to its predecessor PHP 5.6. Similarly, PHP 8.0, with its JIT compiler, showed 20% performance improvements over PHP 7.0 versions (source)
The Risks of Running Outdated PHP Versions
If your web host uses an old PHP version, it could put your website at risk. Outdated PHP versions can have security holes, making it easier for hackers to attack your site. This could lead to serious issues like data loss and can damage your website's trustworthiness.
In addition, sites using older PHP versions are likely to load slower in comparison. This might frustrate visitors and lead to a drop in traffic.
And last but not least, you could face problems with new software, website plugins, or services. WordPress, for example, now requires at least PHP version 7.4. The newest version of PrestaShop (released in November 2022) no longer supports PHP 7.2 or below. Joomla! 4.x recommends the use of PHP 8.0 and above.
So – for a safe, fast, and functional website, it's important to choose a web host that supports a recent PHP version.
Web Hosting Companies and PHP Support
When we say a web hosting company supports a PHP version, we mean that the hosting environment is configured to run that version. It's important because this decides what features your website can use and how secure it is.
Web hosts typically aim to support newer versions of PHP to offer better performance and security to their customers. However, the frequency of these updates varies between hosts, with some offering immediate upgrades and others lagging behind.
How to Check Your Current PHP Version
Determining your current PHP version is fairly simple. If your web host uses cPanel, you can find the PHP version in the “PHP Selector” section. Alternatively, you can create a .php file with the phpinfo() function and upload it to your website. By accessing this file via your browser, you can view your PHP version.
Using WordPress Site Health
For WordPress users, your PHP version is typically displayed in the Site Health section, found in the Tools menu.
Having an understanding of PHP versions and their differences is vital as they directly impact the functionality and security of your website. It's always advisable to keep your PHP version up-to-date, utilizing the latest features and security enhancements offered by the PHP group.