Send a blank email to [email protected] to get a copy of this message
Now we have nullcoalesca operator in PHP:
$a = $a ?? $b;
And nullcoalesce assignment operator:
$a ??= $b;
(which is equivalent of previous example with nullcoalesce operator).
Also we have a short syntax for ternary operator:
$a = $a ?: $b;
which is equivalent to:
$a = $a ? $b : $a;
Maybe we can make a syntax for assignment with short ternary operator?
Somethink like that:
$a ?:= $b;
which would be an equivalent of:
$a = $a ?: $b;
I now, this looks ugly, but maybe we can find another tokens for this
assignments?