What’s New in PHP 7.4
PHP 7.4 was released on November 28th, 2019 and includes a variety of improvements and new features, including arrow functions, typed properties, weak references, and more.
In this brief series, we’ll review one feature per episode to get you up to speed as quickly as possible.
Arrow Functions
PHP 7.4 includes support for arrow functions – or short closures – which allows for a shortened syntax for defining single lines closures with implicit scope binding.
Null Coalescing Assignment Operator
The null coalescing assignment operator (??=) is a fancy term for something that is quite simple to understand. It provides a shorthand for assigning a value to a variable only if it hasn’t been set already.
Spread Operator Within Arrays
As part of PHP 7.4, you may now use the spread operator (…) within arrays.
There are no reviews yet.