Contact Us:
07002007332
CheapDeveloper
CheapDeveloper » Webmaster » News » PHP 8.1 Released: What's New?

PHP 8.1 Released: What's New?

30 November 2021, Tuesday By Victoria Frolova
94
0

An updated version of the PHP language has been released. The release number 8.1 took place on November 25, a year after the start of development. The update brought a lot of innovations expected by fans of the language.

PHP 8.1

Among the changes in PHP 8.1 it is worth highlighting:

  • The ability to enumerate objects, which allows you to replace the declaration of constants inside a class with an enumeration of variables in the body of the enum function.
  • Readonly properties that cannot be changed after program initialization.
  • Ability to use objects as default parameters.
  • Syntax for checking multiple data types in a function argument list.
  • The never property tells the program that the function never returns.
  • Support for fibers, that is, blocks of code that can be started and paused at any time.
  • ARM64-based Just-In-Time support.

Also, the developers have done serious work to optimize the code and made the language more efficient, increasing the processing speed by 23% in the Symfony Demo test and by 3.5% speeding up the launch of WordPress-based sites. 

You can read about other innovations in PHP 8.1 on the official developer blog.

Discuss
Add a comment
Comments (0)
Comment
Partners