PHP 8.0.0

The PHP development team has announced the release of a new version of the language - PHP 8.0.0.

Improvements and new features:

  • union types. Instead of PHPDoc annotations on type combinations, you can use native union type declarations that are checked at run time.

  • named arguments. Instead of PHPDoc annotations, you can now use structured metadata with native PHP syntax.

  • The nullsafe operator. Instead of checking for null, you can now chain calls with the new nullsafe operator. When a check on one element in a chain fails, the entire chain is aborted and it is reduced to null.

  • Just-in-time compilation. PHP 8 introduced two JIT engines. Tracing JIT, the more promising of the two, shows improved performance: 1,5x on synthetic benchmarks and 2-7.4x on some specific applications. Typical application performance is on par with PHP XNUMX.

Source: linux.org.ru