# Supports to ?:= assignment operator

- Thread: https://externals.io/message/112222
- Original archive: https://news-web.php.net/php.internals/112222
- Started by David Rodrigues on 2020-11-11T16:18:02+00:00
- Messages: 2
- RFC: Null Coalesce Equal Operator (Implemented (PHP 7.4)) — https://externals.io/rfc/null_coalesce_equal_operator.md
- RFC: Short Ternary Assignment Operator (Inactive) — https://externals.io/rfc/short_ternary_equal_operator.md
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · RFCs at https://externals.io/rfc.md · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #112222 — David Rodrigues — 2020-11-11T16:18:02+00:00

URL: https://externals.io/message/112222#112222

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

---

## #112223 — bjorn.x.larsson@telia.com — 2020-11-11T16:43:22+00:00

URL: https://externals.io/message/112222#112223 · In reply to: #112222

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:
- https://externals.io/message/91901

Maybe time to bring it forward again for PHP 8.1?

r//Björn Larsson
