Get your next remote job on LaraJobs.
1 contributor Edit on GitHub PHP

PHP 8.4: new features and release date

Table of contents:

PHP 8.4: new features and release date

Introduction

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.

When will PHP 8.4 be released?

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 and test PHP 8.4 on macOS

  1. Install the Homebrew package manager if it’s not done already.
  2. Run brew update to make sure Homebrew and the formulae are up to date.
  3. Add a new tap (basically a GitHub repository) for PHP 8.4’s formula: brew tap shivammathur/php.
  4. 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 php@8.4.
  5. Link it to make sure that the php alias targets the right binary: brew link --overwrite --force php@8.4.

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

What’s new in PHP 8.4

PHP 8.4 comes with an increased bcrypt cost by default

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

PHP 8.4 can parse large XML documents more reliably

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() and 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

Benjamin Crozat

Written by Benjamin Crozat

Indie hacker, blogger, and AI enthusiast building things with the TALL stack. 🔥

Follow me on:

Recommended articles

PHP 8.3 is out, now! Here's what's new and changed. PHP 8.3 is out, now! Here's what's new and changed.

PHP 8.3 was released on November 23, 2023, and as usual, you need to be up to date with new features and breaking changes for easier transitions.

Modified on Nov 23, 2023

PHP
An early look at PHP 9.0's new features and changes An early look at PHP 9.0's new features and changes

PHP 9.0 is still far in the future. We don't know a lot, but we have a few breaking changes planned for it.

Published on Nov 3, 2023

PHP
Is PHP dead? Usage statistics and market share for 2023. Is PHP dead? Usage statistics and market share for 2023.

Whether PHP is dead is a matter of numbers, not opinions. I will provide you with essential statistics that will lead you to make better decisions.

Modified on Sep 19, 2023

PHP
Methods with the same name as their class will not be constructors in a future version of PHP Methods with the same name as their class will not be constructors in a future version of PHP

Learn why and how to fix "Methods with the same name as their class will not be constructors in a future version of PHP" warnings.

Modified on Nov 23, 2022

PHP
PHP for Mac: get started fast using Laravel Valet PHP for Mac: get started fast using Laravel Valet

Use your Mac as an ideal PHP environment thanks to the power of Laravel Valet. You can finally say goodbye to Docker!

Modified on Aug 12, 2023

Gold sponsors New

  • Wire Elements
    Beautiful handcrafted Livewire components.
    Check site
Your business here

Partners

If you buy from one of my partners below, I will be compensated at no cost to you. These are services I use or used, and 100% stand behind.

  • Scalable and reliable VPS hosting.
    Bonus: $200 of free credits
    Check site
  • The Google Analytics alternative without compromise.
    Free trial: 30 days
    Bonus: $10 off your first invoice
    Check site
  • Flare
    Track PHP and JavaScript errors in one place.
    Free trial: 10 days
    Check site
  • Keep track of your Google rankings.
    Free trial: 7 days
    Promo code: WELCOME30
    Check site
- / -