PHP 7.4 Released: With Typed Properties and Arrow Functions

November 28, PHP developer team released PHP 7.4.0. In addition to the improvements in the quality, many features were enhanced in this release.

PHP 7.4 is the fourth feature update of the PHP 7 series, released in December, 2015. The previous PHP 7.3 was released in December, 2019.

Now it supports type declaration for properties. Also, arrow function syntax, which uses “=>” for defining functions, has been added. Now with the newly introduced Weak References, programmer can retain a reference to an object that can’t be prevented from being destroyed.

An extension called FFI (Foreign Function Interface) was added in this release, which accesses functions, variables and structures defined in C language. You can use PHP expansions without having to describe it.

In serializing custom objects, there’s a new magic method “__serialize/__unserialize”. Also, now it supports Opache preload, which keeps a specific PHP file cached in memory before executing the code, and this preloading will improve the performance. There are many more new features.

To install PHP 7.4, visit the project’s website.

PHP
https://www.php.net/