I\'ve just seen a video about upcoming PHP 7.4 features and saw this new ??= operator. I already know the ?? operator.
??=
??
How\'s this different
The null coalescing assignment operator is a shorthand way of assigning the result of the null coalescing operator.
An example from the official release notes:
$array['key'] ??= computeDefault(); // is roughly equivalent to if (!isset($array['key'])) { $array['key'] = computeDefault(); }