# Question on Null Coalesce Operator ( ?? )

- Thread: https://externals.io/message/79583
- Original archive: https://news-web.php.net/php.internals/79583
- Started by Alain Williams on 2014-12-11T22:31:56+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #79583 — Alain Williams — 2014-12-11T22:31:56+00:00

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

I am updating a PHP course that I occasionally teach ...

Null Coalesce Operator ( ?? )
What are the precedence and associativity ?

    https://wiki.php.net/rfc/isset_ternary

TIA

-- 
Alain Williams
Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer.
+44 (0) 787 668 0256  http://www.phcomp.co.uk/
Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk/contact.php
#include <std_disclaimer.h

---

## #79584 — Christoph Becker — 2014-12-11T22:43:17+00:00

URL: https://externals.io/message/79583#79584 · In reply to: #79583

Alain Williams wrote:

> I am updating a PHP course that I occasionally teach ...
> 
> Null Coalesce Operator ( ?? )
> What are the precedence and associativity ?
> 
>     https://wiki.php.net/rfc/isset_ternary

According to master[1] it's right associative and the precendence is
between ?: and ||.

[1]
<https://github.com/php/php-src/commit/2d069f640e6cccfa3ba8b1e4f375ade20fb33f64>

-- 
Christoph M. Becker
