New Features and Changes in PHP 8.4 Release (Nov 21, 2024)
PHP 8.4, released on November 21, 2024, introduces performance, usability, and security enhancements such as property hooks, a parenthesis‑free new operator, powerful array functions, an HTMLDocument class, new Sodium algorithms, a request parsing helper, stricter type declarations, JIT optimizations, and migration of several extensions to PECL.
PHP will release version 8.4 on November 21, 2024, focusing on performance, usability, and security improvements.
Key New Features:
1. Simplified data handling: Property hooks are introduced, allowing custom "get" and "set" hooks for properties, reducing boilerplate and streamlining object data processing.
2. More concise syntax: Objects can now be instantiated with a parenthesis‑free new , making method and property chaining cleaner.
3. Enhanced array handling: New utility functions array_find() , array_find_key() , array_any() , and array_all() provide powerful array operations.
4. Improved HTML5 support: The new \Dom\HTMLDocument class offers better compatibility and parsing for modern HTML5 documents.
5. Strengthened security: The Sodium extension now supports the AEGIS‑128L and AEGIS‑256 encryption algorithms.
6. Easier web development: The new request_parse_body() function simplifies parsing of request bodies.
Deprecations and Changes:
1. Stricter type declarations: Implicit nullable parameters are deprecated; nullable types must now be declared explicitly with "?".
2. JIT compiler optimizations: JIT settings have been updated for more direct and efficient configuration, further boosting execution speed.
3. Some extensions moved to PECL: Extensions such as OCI8, PDO‑OCI, IMAP, and Pspell have been migrated from the core to the PECL repository, requiring developers to update dependencies.
Overall, PHP 8.4 brings numerous enhancements that improve developer experience, code readability, performance, and security.
php中文网 Courses
php中文网's platform for the latest courses and technical articles, helping PHP learners advance quickly.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.