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

sale

-14.9%

CPU
CPU
3 Xeon Cores
RAM
RAM
1 GB
Space
Space
40 GB HDD
Bandwidth
Bandwidth
Unlimited
KVM-HDD 1024 Linux

6.1 /mo

/mo

Billed annually

sale

-15%

CPU
CPU
4 Xeon Cores
RAM
RAM
4 GB
Space
Space
50 GB SSD
Bandwidth
Bandwidth
4 TB
KVM-SSD 4096 Metered Linux

31 /mo

/mo

Billed annually

sale

-15%

CPU
CPU
6 Epyc Cores
RAM
RAM
8 GB
Space
Space
100 GB NVMe
Bandwidth
Bandwidth
Unlimited
KVM-NVMe 8192 Linux

26.35 /mo

/mo

Billed annually

sale

-15%

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

72 /mo

/mo

Billed annually

sale

-15%

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 monthly

sale

-15%

CPU
CPU
6 Xeon Cores
RAM
RAM
8 GB
Space
Space
200 GB HDD
Bandwidth
Bandwidth
Unlimited
wKVM-HDD 8192 Windows

31.25 /mo

/mo

Billed monthly

sale

-15%

CPU
CPU
2 Xeon Cores
RAM
RAM
2 GB
Space
Space
30 GB SSD
Bandwidth
Bandwidth
300 GB
KVM-SSD 2048 HK Linux

18 /mo

/mo

Billed annually

sale

-15%

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

70.49 /mo

/mo

Billed annually

sale

-15%

CPU
CPU
8 Xeon Cores
RAM
RAM
32 GB
Space
Space
200 GB SSD
Bandwidth
Bandwidth
12 TB
KVM-SSD 32768 Metered Linux

150 /mo

/mo

Billed monthly

sale

-14.9%

CPU
CPU
3 Epyc Cores
RAM
RAM
2 GB
Space
Space
25 GB NVMe
Bandwidth
Bandwidth
Unlimited
wKVM-NVMe 2048 Windows

9.9 /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.