Once I stumbled with php7 code with operator ??=
. I tried to search, what it clearly does, but could not find easily. I tried to read out the php operators and even most official resources have all operators description and even compound operators like .=
, +=
, but there are no description for ??=
For example, PHP Operators keeps descriptions of all operators, as straight form (.
, +
), as compound (.=
, +=
), but there is no ??=
, and because of that I firstly was confused and thought it's something totally another.
The issue is simple and obvious, but the whole case is a bit confusing, that's why I try to help other php-beginners like me