PHP 8.4 Released: Property Hooks and Asymmetric Visibility Arrive
PHP 8.4 brought property hooks, asymmetric visibility, a new DOM API with HTML5 support, and a fresh JIT implementation.
Historical Archive. This article documents an event from 2024 and is preserved with its original date for reference. It is not current news, and details may have changed since publication.
PHP 8.4 was released on November 21, 2024, continuing the language's steady modernisation. It is a feature-rich update that introduces two long-requested object-oriented capabilities, reworks the DOM extension, and rebuilds the just-in-time compiler, alongside the usual round of smaller functions and cleanups.
Property hooks
The headline feature is property hooks, which let a class define computed get and set behaviour directly on a property. Previously, developers reached for explicit getter and setter methods, or documented computed behaviour in docblocks that could drift out of sync with the code. Property hooks make that behaviour a first-class part of the property that IDEs and static analysis tools understand natively, reducing boilerplate while keeping pre- and post-processing reliable.
Asymmetric visibility
PHP 8.4 also adds asymmetric visibility, which allows the scope that may write to a property to differ from the scope that may read it. A common pattern is a property that is publicly readable but only writable from within its own class, expressed as public private(set). This removes a large class of boilerplate getters that existed only to expose a value without allowing outside modification.
A new DOM API with HTML5 support
The release adds a new DOM API under the Dom namespace, including Dom\HTMLDocument and Dom\XMLDocument. It brings standards-compliant HTML5 parsing and fixes several long-standing compliance issues, while keeping the older classes for backward compatibility. Convenience methods such as querySelector make working with documents more ergonomic.
New JIT, functions and cleanups
PHP 8.4 introduces a new JIT implementation based on the IR framework, adds array helper functions such as array_find(), array_any() and array_all(), a #[\Deprecated] attribute for user-defined code, an object API for BCMath, and PDO driver-specific subclasses. As with every major release, some older behaviour is deprecated and a handful of extensions were unbundled, so reviewing the migration guide before upgrading is worthwhile.
Support timeline
According to php.net, the PHP 8.4 branch received its initial stable release on November 21, 2024, with active support scheduled into the end of 2026 and security fixes into the end of 2028, following PHP's standard four-year support window.
Related on Skillo
See also: Laravel 12, which supports PHP 8.2 to 8.5.
Sources
Published date reflects the original event date (2024-11-21). This article is original Skillo editorial written from the sources above; facts were verified in September 2026.
Written by
Skillo Staff
0 Comments
Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.