PHP 8.4 now available on all hosting plans
PHP 8.4 is now available on all hosting plans, so you can take advantage of the latest improvements and optimisations this version brings. Switching between versions takes just a few seconds thanks to the PHP version selector in the cPanel control panel.
What's new
The most notable improvements in this version include:
- Property Hooks: a new syntax for computed properties that improves integration with IDEs and static analysis tools.
- Asymmetric visibility: lets you control read and write access to properties independently.
- New DOM API: better HTML5 support and new classes that follow current web standards.
- Object-oriented API for BCMath: a new
BcMath\Numberclass that lets you use standard maths operators with arbitrary precision numbers. - New array functions:
array_find(),array_find_key(),array_any()andarray_all()to simplify common operations. - Driver-specific PDO subclasses: new specialised classes for each database driver.
For full details of everything that's new, we recommend you read the official PHP 8.4 release notes.
Compatibility and migration
This version does include some changes that could affect compatibility, in particular:
- The IMAP, OCI8, PDO_OCI and pspell extensions have been moved to PECL
- Implicitly nullable parameter types are deprecated
- Changes to how
exit()behaves - The E_STRICT constant is deprecated
- Several changes to the MySQLi extension
So we recommend these steps when upgrading:
- Read the official migration guide in case your application needs any changes
- Change the PHP version from the selector in cPanel
- Check that everything works correctly
- If you find a problem, you can simply go back to the previous version in a few seconds and everything will be as it was, working again
Recommendations
To get the best performance and security from your applications, we recommend:
- Always keeping your PHP version up to date with the latest one your application supports
- Enabling the opcache module to optimise performance
- Checking plugin and theme compatibility if you use a CMS such as WordPress, Joomla, etc.
If you run into any problem during the upgrade, you can go back to the previous version from the PHP selector in cPanel and contact us so we can help you sort it out.
Available versions
Remember that besides PHP 8.4, we keep earlier versions available to ensure compatibility with legacy applications, all with their security patches thanks to CloudLinux:
- PHP 8.4 (New)
- PHP 8.3
- PHP 8.2
- PHP 8.1
- PHP 8.0
- PHP 7.4 and earlier
The flexibility to switch between versions lets you keep your applications compatible while you get ready to upgrade to newer versions.