All information about the update to PHP version 8.4 at FireStorm

On 21 November 2024, the PHP Group released the new PHP version 8.4. Just under two weeks later, PHP 8.4 was activated on all FireStorm servers. In this article, we would like to inform you about the most important new features of PHP 8.4.

 

What is PHP?

PHP (Hypertext Preprocessor) is a server-side scripting language that is used to develop dynamic websites. Since its creation in 1994, PHP has become one of the most widely used programming languages on the web. It enables the simple integration of HTML and seamless collaboration with databases, making it easier for developers to create powerful web content.

 

Over 77% of all websites with server-side programming use PHP – including Facebook, Wikipedia and WordPress!

 

 

 

What new features does PHP version 8.4 offer?

PHP version 8.4 brings numerous improvements and new functions. In addition to the usual bug fixes and performance optimisations, the following main features have been introduced:

Property Hooks: allow getter and setter methods to be defined directly on properties, making the code cleaner and easier to maintain.

Asymmetric visibility: Allows different visibility levels to be defined for reading and writing properties. For example, a property can be publicly readable, but only writable within the class.

Instantiation without brackets: In PHP 8.4, it is possible to chain methods directly to a new class instance without having to use additional parentheses.

New array functions: Functions such as array_find(), array_find_key(), array_any() and array_all() make working with arrays much easier.

HTML5 support: The new DomHTMLDocument parser now fully supports HTML5, which simplifies the processing of modern HTML documents.

Multibyte trim functions: Strings with multibyte characters can be trimmed efficiently with mb_trim(), mb_ltrim() and mb_rtrim().

 

 

Deprecated functions in PHP 8.4

Some functions have been marked as deprecated in PHP 8.4 and should be avoided. These include the constants E_STRICT and SUNFUNCS_RET_* as well as the use of session_set_save_handler() with more than two arguments.

 

 

Brief summary of the new features of PHP version 8.4

The innovations listed make PHP 8.4 a powerful and user-friendly version that offers developers additional tools and possibilities. We recommend that you try out PHP version 8.4 for yourself, which is of course possible with FireStorm!

Related Post