
PHP v8.4 Released

PHP 8.4 has officially been released, bringing a host of new features, performance improvements, and changes to the language. This latest version introduces enhancements that streamline development and improve efficiency, making it an exciting update for developers working with PHP.
New Features in PHP 8.4
-
Property Hooks: A new approach to handling getters and setters, allowing computed properties to be natively understood by IDEs and static analysis tools.
-
Asymmetric Visibility: Developers can now control read and write access to properties independently, reducing the need for boilerplate getter methods.
-
New Array Functions: Functions such as
array_find
,array_find_key
,array_any
, andarray_all
make working with arrays more intuitive. -
HTML5 Parsing in DOM Extension: Improved support for HTML5 parsing within the DOM extension.
-
Multibyte Trim Functions: New functions
mb_trim
,mb_ltrim
, andmb_rtrim
enhance string manipulation. -
New DateTime Methods:
DateTime::createFromTimestamp
andDateTime::get/setMicrosecond
provide more precise time handling.
Changes and Deprecations
-
Exit and Die Functions: These have been changed from language constructs to functions.
-
Updated Password Hashing: The default bcrypt cost has increased from 10 to 12 for improved security.
-
Deprecated Features: Implicitly nullable parameter declarations, E_STRICT constant, and certain session handler arguments have been deprecated.
-
Removed Extensions: The Pspell, IMAP, OCI8, and PDO-OCI extensions have been moved from PHP Core to PECL.
Performance Improvements
-
PCRE2 Upgrade: Regular expression handling has been improved with the latest PCRE2 updates.
-
Opcache Enhancements: Changes to JIT settings improve execution speed.
-
Updated Curl Support: New constants and options enhance HTTP/3 support.