PHP 8.4: new features and release date
Table of contents:
When will PHP 8.4 be released?
Install and test PHP 8.4 on macOS
- What’s new in PHP 8.4
PHP is an open-source project. Knowing what’s going on for PHP 8.4 only takes a minute of research. For instance, this page lists all the accepted RFCs for different versions of PHP, including PHP 8.4.
PHP 8.4 will be released on November 21, 2024, according to the preparation tasks list. It will be tested through three alpha releases, three betas, and six release candidates.
|Date||Release of PHP 8.4|
|June 6, 2024||Alpha 1|
|June 20, 2024||Alpha 2|
|July 4, 2024||Alpha 3|
|July 16, 2024||Feature freeze|
|July 18, 2024||Beta 1|
|August 1, 2024||Beta 2|
|August 15, 2024||Beta 3|
|August 29, 2024||RC 1|
|September 12, 2024||RC 2|
|September 26, 2024||RC 3|
|October 10, 2024||RC 4|
|October 24, 2024||RC 5|
|November 7, 2024||RC 6|
|November 21, 2024||GA|
- Install the Homebrew package manager if it’s not done already.
brew updateto make sure Homebrew and the formulae are up to date.
- Add a new tap (basically a GitHub repository) for PHP 8.4’s formula:
brew tap shivammathur/php.
- Install the pre-compiled binary for PHP 8.4 (also called “a bottle” in Homebrew’s context). This will make the install so much faster.
brew install email@example.com.
- Link it to make sure that the
phpalias targets the right binary:
brew link --overwrite --force firstname.lastname@example.org.
If you want to learn more about how to install PHP on your Mac, I wrote something for you: PHP for Mac: get started fast using Laravel Valet
In PHP 8.4, the default cost of bcrypt has been increased to 12. What does that even mean?
Bcrypt is the password hashing function that PHP uses. It acts as a shield against hackers who would want to crack passwords.
The strength of this shield can be adjusted. The higher the setting or the “cost”, the stronger the shield because bcrypt is an adaptive function: “over time, the iteration count can be increased to make it slower, so it remains resistant to brute-force search attacks even with increasing computation power.”
And why is it such a big deal? Because increasing the cost of bcrypt makes password hashing a few milliseconds slower.
Learn more: PHP RFC: Increasing the default BCrypt cost
This change resolved a potential issue in the ext/xml PHP extension involving its handling of large XML document parsing.
Conflicting modifications in libxml2 version 2.7.0 unintentionally disrupted large document parsing when using
xml_parse_into_struct() functions, resulting in a parsing error.
PHP 8.4 introduced a new parser option to properly handle these large XML documents and prevent the parsing error, making it possible for developers to parse large XML documents effectively, without needing complex workarounds.
Learn more: PHP RFC: XML_OPTION_PARSE_HUGE