Release of PHP 8.4: Key Updates

Release of PHP 8.4: Key Updates

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.

views 1m, 1s
views 2
Share

Was this article helpful to you?

VPS popular offers

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.