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

-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

-10%

CPU
CPU
3 Epyc Cores
RAM
RAM
2 GB
Space
Space
20 GB NVMe
Bandwidth
Bandwidth
Unlimited
KVM-NVMe 2048 Linux

8.8 /mo

/mo

Billed annually

-9.3%

CPU
CPU
6 Xeon Cores
RAM
RAM
16 GB
Space
Space
150 GB SSD
Bandwidth
Bandwidth
Unlimited
wKVM-SSD 16384 Windows

53.99 /mo

/mo

Billed annually

-10%

CPU
CPU
6 Xeon Cores
RAM
RAM
8 GB
Space
Space
100 GB SSD
Bandwidth
Bandwidth
Unlimited
MT5 KVM 8192 Linux

29.99 /mo

/mo

Billed annually

-21.4%

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

67 /mo

/mo

Billed annually

-7.1%

CPU
CPU
4 Xeon Cores
RAM
RAM
4 GB
Space
Space
100 GB HDD
Bandwidth
Bandwidth
Unlimited
wKVM-HDD 4096 Windows

21 /mo

/mo

Billed annually

-10%

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

-20.2%

CPU
CPU
1 Xeon Core
RAM
RAM
1 GB
Space
Space
50 GB SSD
Bandwidth
Bandwidth
300 GB
wKVM-SSD 1024 HK Windows

19 /mo

/mo

Billed annually

-9.5%

CPU
CPU
8 Epyc Cores
RAM
RAM
32 GB
Space
Space
200 GB NVMe
Bandwidth
Bandwidth
Unlimited
wKVM-NVMe 32768 Windows

74.49 /mo

/mo

Billed annually

-12.3%

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

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