The PHP development team has officially released the first release candidate (RC1) of PHP 8.4, offering developers an opportunity to explore and test the new features ahead of its general availability (GA). Although the full release is slated for November 21, 2024, this release candidate provides a chance to start preparing for the transition to PHP 8.4.
PHP 8.4 brings a range of enhancements and new capabilities that developers can begin exploring, as well as a few important changes to be aware of. Ensuring familiarity with the new features, upgrade paths, and the release schedule will help users make a smoother transition when the final version becomes available.
Key Features in PHP 8.4
PHP 8.4, while being a minor version, introduces several noteworthy updates designed to improve performance and ease of use. Some of the most anticipated features include:
- request_parse_body() function: This new function allows for the parsing of RFC1867 (multipart) requests in non-POST HTTP methods.
- Simplified Class Instantiation: Developers can now instantiate classes without requiring additional parentheses when there are no constructor arguments, improving code readability and reducing unnecessary syntax.
- #[\Deprecated] Attribute: A new feature allowing developers to mark elements as deprecated via an attribute, making codebase maintenance more straightforward.
- Property Hooks: This new addition introduces hooks that allow for more flexible property management, enhancing the way developers can handle property access and updates.
- Asymmetric Property Visibility: PHP 8.4 allows properties to have different visibility for read and write operations, offering more control over how data is accessed within classes.
- Lazy Objects: This feature introduces lazy initialization of objects, which can optimize performance by delaying object creation until they are needed.
- Additional HTTP Functions: New functions, such as http_get_last_response_headers() and http_clear_last_response_headers(), have been added to better manage HTTP responses.
- fpow() Function: This function adheres to IEEE 754 rules for exponentiation, providing developers with a more precise mathematical operation.
- Array Find Methods: Several new array find functions have been introduced, making it easier to search for values within arrays.
These are just a few highlights of what PHP 8.4 has to offer. For a full list of the new features, including more technical details, refer to the official upgrading document.
PHP 8.4 Release Timeline
PHP 8.4 has successfully moved out of the beta phase and is now in the release candidate stage. The final general availability (GA) version is expected to be released on November 21, 2024. Developers and organizations relying on PHP are encouraged to begin testing their applications with the release candidate to ensure compatibility and to take advantage of the new features.
By familiarizing yourself with PHP 8.4 early on, you can make the necessary preparations to transition smoothly once the GA version is released. For those eager to start testing now, the RC1 version is available for download.
Additional Resources
To dive deeper into the changes coming in PHP 8.4 and stay up-to-date with the release process, the following resources are recommended:
The Upgrading Document: This includes backward-incompatible changes and a detailed overview of all new features introduced in PHP 8.4.
The News Document: Comprehensive notes about each PHP 8.4 release, including fixes and feature updates.
PHP 8.4 Preparation Tasks: A page outlining the complete release timeline, along with important tasks for preparation.
Download PHP 8.4 RC1: The RC1 version is available for testing and can be downloaded from the PHP official downloads page.
While the full release is still a couple of months away, now is the perfect time to get acquainted with what PHP 8.4 has to offer and ensure your development environment is prepared for the transition.
In our blog, we post technology-related articles bi-weekly. Follow us on Facebook and Instagram to get notifications about updates.