PHP 8 Release and Features

PHP 8 is scheduled to be released on November 26, 2020. PHP 8 is currently in beta.PHP 8 is a major version and has breaking changes from previous versions.New features and notable changes include.

 It’s a new major version release of PHP, which means that it will introduce some breaking changes, as well as lots of new features and performance improvements.

The main features –

Just-in-time compilation

The PHP 8’s will use a JIT compiler, that can provide substantial performance improvements for some use cases.

Match statement

The php 8 introduced match statement, that functionality will be like switch statement.

Type changes and additions

PHP 8 introduced union types like – static return type, and a new mixed type.

There are some other features –

  • Arrays starting with a negative index
  • TypeError on invalid arithmetic/bitwise operators
  • Reclassification of various engine errors
  • Consistent type errors for internal functions
  • Fatal error for incompatible method signatures
  • Locale independent float to string conversion
  • Variable Syntax Tweaks
  • Named Arguments
  • Nullsafe operator
  • non-capturing catches
  • throw expression

You can get more information from Official Docs.