PHP 8.0 released

Subscribe to our newsletter

The PHP developers have released the major 8.0 version of the well-known web programming language. It brings several modern features that are known from other programming languages and are supposed to improve reliability and convenience such as named arguments, union types, match expressions, a nullsafe operator and improvements to the type system.

For instance the nullsafe operator enables the chaining of method calls without worrying about null exceptions. To this end a new syntax with a questionmark is introduced that implicitly checks a value and executes the chained method conditionally, for instance:

$country = $session?->user?->getAddress()?->country;

In addition to the new language features PHP 8.0 has introduced the Just-in-time compiler (JIT) that's supposed to accelerate the execution of PHP in the future. There are currently competing implementations of a JIT (tracing and function) with the tracing variant performing slightly better.

Get our weekly newsletter

Marketing permission: I give my consent to KUBEMAG to be in touch with me via email using the information I have provided in this form for the purpose of news and updates.