unread
Hello!
PHP currently supports ??= assignment, as shortly to $a = $a ?? null, but
it does not supports ?:= as shortly to $a = $a ?: null.
There are some reason to that?
- https://wiki.php.net/rfc/null_coalesce_equal_operator
- https://wiki.php.net/rfc/short_ternary_equal_operator
Thanks!
Atenciosamente,
David Rodrigues
unread
Hi,
Den 2020-11-11 kl. 17:18, skrev David Rodrigues:
Hello!
PHP currently supports ??= assignment, as shortly to $a = $a ?? null, but
it does not supports ?:= as shortly to $a = $a ?: null.There are some reason to that?
- https://wiki.php.net/rfc/null_coalesce_equal_operator
- https://wiki.php.net/rfc/short_ternary_equal_operator
Thanks!
Atenciosamente,
David Rodrigues
Work on this was done by Sara Golemon during 2016. I recall that
the voting was closed, see:
Maybe time to bring it forward again for PHP 8.1?
r//Björn Larsson