Release of PHP 8.4: Key Updates

watch 1m, 1s
views 2

15:49, 21.11.2024

Article Content
arrow

  • Key Changes
  • Other Improvements
  • PHPStan 2.0

On November 21, 2024, PHP 8.4 was released, featuring updates and changes that break compatibility with previous versions.

Key Changes

  • JIT Compiler:A new implementation based on the IR Framework was introduced. The new approach unifies architecture support through a single backend and intermediate representation (IR), which is optimized before being converted into machine instructions.
  • Property Hooks:A mechanism for property handlers was added, simplifying change management without the need for __get and __set methods.
  • New Property Features:Separate visibility settings for read and write operations (public, private, protected) are now supported.
  • Lazy Objects:A mechanism was introduced to initialize objects only upon their first use.

Other Improvements

The update includes the addition of the \Dom\HTMLDocument class for parsing HTML5, the request_parse_body() function for handling multipart/form-data requests, and new PDO subclasses (e.g., Pdo\MySql, Pdo\Sqlite). Operations exit and die are now supported as functions, and microsecond precision was added for working with dates.

Among new restrictions, the automatic assignment of null to function parameters without an explicit ? prefix is now prohibited. Certain mysqli methods and DOMDocument properties have been deprecated, and the GMP class has been finalized.

PHPStan 2.0

On November 11, 2024, PHPStan 2.0 was released — a tool for static analysis of PHP code without execution or testing.

Share

Was this article helpful to you?

VPS popular offers

-10%

CPU
CPU
6 Xeon Cores
RAM
RAM
16 GB
Space
Space
400 GB HDD
Bandwidth
Bandwidth
300 Gb
KVM-HDD HK 16384 Linux

40.15 /mo

/mo

Billed annually

-10%

CPU
CPU
6 Xeon Cores
RAM
RAM
16 GB
Space
Space
150 GB SSD
Bandwidth
Bandwidth
Unlimited
10Ge-KVM-SSD 16384 Linux

231 /mo

/mo

Billed annually

-10%

CPU
CPU
8 Xeon Cores
RAM
RAM
32 GB
Space
Space
200 GB SSD
Bandwidth
Bandwidth
Unlimited
KVM-SSD 32768 Linux

93.5 /mo

/mo

Billed annually

-29.4%

CPU
CPU
4 Xeon Cores
RAM
RAM
2 GB
Space
Space
30 GB SSD
Bandwidth
Bandwidth
2 TB
KVM-SSD 2048 Metered Linux

17 /mo

/mo

Billed annually

-8.1%

CPU
CPU
6 Xeon Cores
RAM
RAM
8 GB
Space
Space
100 GB SSD
Bandwidth
Bandwidth
Unlimited
wKVM-SSD 8192 Windows

31.9 /mo

/mo

Billed annually

-9.5%

CPU
CPU
4 Xeon Cores
RAM
RAM
8 GB
Space
Space
100 GB SSD
Bandwidth
Bandwidth
Unlimited
10Ge-wKVM-SSD 8192 Windows

121.5 /mo

/mo

Billed annually

-10%

CPU
CPU
8 Epyc Cores
RAM
RAM
32 GB
Space
Space
200 GB NVMe
Bandwidth
Bandwidth
Unlimited
KVM-NVMe 32768 Linux

96.8 /mo

/mo

Billed annually

-10%

CPU
CPU
4 Xeon Cores
RAM
RAM
8 GB
Space
Space
100 GB SSD
Bandwidth
Bandwidth
Unlimited
10Ge-KVM-SSD 8192 Linux

115.5 /mo

/mo

Billed annually

-10%

CPU
CPU
2 Xeon Cores
RAM
RAM
512 MB
Space
Space
10 GB SSD
Bandwidth
Bandwidth
Unlimited
KVM-SSD 512 Linux

5.2 /mo

/mo

Billed annually

-5.3%

CPU
CPU
4 Xeon Cores
RAM
RAM
2 GB
Space
Space
60 GB HDD
Bandwidth
Bandwidth
300 Gb
wKVM-HDD HK 2048 Windows

11.6 /mo

/mo

Billed annually

Other articles on this topic

cookie

Accept cookies & privacy policy?

We use cookies to ensure that we give you the best experience on our website. If you continue without changing your settings, we'll assume that you are happy to receive all cookies on the HostZealot website.