We are excited to announce the availability of PHP 8.4 on WordPress VIP.
This version introduces a series of new features, optimizations, and updates, continuing PHP’s journey toward better performance, developer experience, and modern flexibility. Here are some key highlights:
- Property Hooks: Property hooks provide support for computed properties that can natively be understood by IDEs and static analysis tools. Implementing property hooks may significantly reduce the amount of boilerplate getters and setters.
- Asymmetric Visibility: The scope to write to a property may now be controlled independently from the scope to read the property, reducing the need for boilerplate getter methods to expose a property’s value without allowing modification from the outside of a class.
- Array Enhancements: New native functions array_find, array_find_key, array_any, and array_all simplify common array operations.
- Lazy Objects: Native support for creating lazy-initialized objects whose initialization is deferred until its state is observed or modified.
- New JIT implementation based on Intermediate Representation Framework.
- HTML5-compliant DOM API: New DOM API that includes standards-compliant support for parsing HTML5 documents, fixes several long-standing compliance bugs in the behavior of the DOM functionality, and adds several functions to make working with documents more convenient.
- Object-Oriented BCMath: Introduces an object-oriented API for BCMath
- new MyClass()->method() without parentheses: Properties and methods of a newly instantiated object can now be accessed without wrapping the new expression in parentheses.
For a full breakdown of changes, visit the PHP 8.4 Release Announcement.
Testing your application with PHP 8.4
It’s always a good idea to test your application code with every new release of PHP. WordPress VIP recommends that you use several methods to prepare for a PHP upgrade.
Scan your codebase for incompatibilities
Review the WordPress VIP documentation “Prepare application code for a PHP version upgrade” guide and perform the scan.
Test with the VIP Local Development Environment
We recommend using the VIP Local Development Environment to test your application code locally.
Create a new environment with PHP 8.4:
vip dev-env create --slug=mytestsite --php=8.4
Or update an existing local environment with PHP 8.4:
vip dev-env update --slug=mytestsite --php=8.4
Test with VIP Codespaces
Update your devcontainer.json PHP feature definition and rebuild the codespace:
{
"features": {
"ghcr.io/automattic/vip-codespaces/php:latest": {
// PHP version options: 8.1, 8.2, 8.3, 8.4
"version": "8.4",
"composer": true
}
}
Test with a non-production VIP Platform environment
To update your non-production environments to PHP 8.4, either use the Software Management feature in the VIP Dashboard, or run the vip config software update command with VIP-CLI. For example:
vip @mytestsite.testing config software update php 8.4
Please Note: Currently, our minimum supported version is 8.1. Security support for 8.1 ends on December 31, 2025.
Let VIP Do The Heavy Lifting!
Instead of the do-it-yourself approach, focus on your key priorities while our experienced staff manage, validate, and implement your PHP update for you with the specific needs of your applications in mind. Maximize your team’s resources, improve site stability, and unlock peace of mind with our Upgrade Assurance Service. If you’re interested in learning more, please connect with your Relationship Manager, or reach out to our Support Team.