PHP 8.4 released with property hooks, asymmetric visibility, an updated DOM API, and more
Nov 21, 2024 at 3:15 PM

PHP 8.4 released with property hooks, asymmetric visibility, an updated DOM API, and more

PHP 8.4 has been released, introducing a range of new features and improvements to the widely-used programming language. Key updates include property hooks, which support computed properties natively understood by IDEs and static analysis tools, enhancing pre- or post-processing of values. Asymmetric visibility now allows separate control over reading and writing permissions for properties, reducing the need for boilerplate getters.

The release also introduces the #[\Deprecated] attribute, extending PHP's deprecation mechanism to user-defined functions, methods, and class constants. The updated DOM API offers standards-compliant support for HTML5 parsing and resolves several compliance issues. BCMath now supports object-oriented style and operator overloading for arbitrary precision float numbers.

New array functions array_find(), array_find_key(), array_any(), and array_all() have been added, alongside new PDO subclasses for various databases, including Pdo\Dblib, Pdo\Firebird, Pdo\MySql, Pdo\Odbc, and Pdo\Sqlite. Additionally, properties and methods of new objects can be accessed without wrapping the new expression in parentheses, streamlining code syntax. The update also includes performance enhancements, bug fixes, and general cleanup.

Nov 21, 2024 by Paul

cz
city_zen found this interesting
PHP iconPHP
  470
  • ...

PHP is a widely-used general-purpose scripting language, particularly suited for web development and capable of being embedded into HTML. It is known for its object-oriented capabilities, portability, and lightweight nature. Rated 4.3, PHP is a popular choice among developers, with top alternatives including Python, JavaScript, and Java.

No comments so far, maybe you want to be first?
Gu