Re: [PHP-DEV] [DISCUSSION] Ternary nullcoalesce operator

2025-02-20 Thread Faizan Akram Dar
On Thu, 20 Feb 2025, 13:15 Mihail Liahimov, <91lia...@gmail.com> wrote: > 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

[PHP-DEV] [DISCUSSION] Ternary nullcoalesce operator

2025-02-20 Thread Mihail Liahimov
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