# [RFC] Implicit isset() in Shorthand Ternary Operator

- Thread: https://staging.externals.io/message/77272
- Original archive: https://news-web.php.net/php.internals/77272
- Started by Thomas Bley on 2014-09-16T19:28:42+00:00
- Messages: 3
- RFC: Null Coalesce Operator (Implemented (PHP 7.0)) — https://staging.externals.io/rfc/isset_ternary.md
- Reply by email to internals@lists.php.net
- More for agents: search with https://staging.externals.io/search.md?q={query} · RFCs at https://staging.externals.io/rfc.md · JSON API at https://staging.externals.io/api · documentation at https://staging.externals.io/llms.txt

---

## #77272 — Thomas Bley — 2014-09-16T19:28:42+00:00

URL: https://staging.externals.io/message/77272#77272

Andrea Faulds wrote on 16.09.2014 20:34:

> 
> 
> 
> > […]
> 
> By popular demand, I’ve changed the RFC to instead propose a ?? operator,
> after Nikita Popov generously donated a working ?? patch. In doing so, the RFC
> is renamed “Null Coalesce Operator”.
> 
> Please read it: https://wiki.php.net/rfc/isset_ternary
> 
> Thanks!
> --
> Andrea Faulds
> http://ajf.me/
> 
> 
> 
> 
> 
> --
> 
> 
> 

looks good!

What are the pros and cons of a new operator vs. a new function? For example, MySQL has a coalesce() function:
http://dev.mysql.com/doc/refman/5.6/en/comparison-operators.html#function_coalesce

Regards,
Thomas

---

## #77273 — Andrea Faulds — 2014-09-16T19:30:30+00:00

URL: https://staging.externals.io/message/77272#77273 · In reply to: #77272

> What are the pros and cons of a new operator vs. a new function? For example, MySQL has a coalesce() function:
> http://dev.mysql.com/doc/refman/5.6/en/comparison-operators.html#function_coalesce

A function is useless as it wouldn’t stop you getting E_NOTICEs.

--
Andrea Faulds
http://ajf.me/

---

## #77274 — Thomas Bley — 2014-09-16T19:58:58+00:00

URL: https://staging.externals.io/message/77272#77274 · In reply to: #77273

Sorry, I mean to implement coalesce() as a token like isset() ?

Regards,
Thomas


Andrea Faulds wrote on 16.09.2014 21:30:

> 
> 
> 
> > […]
> 
> A function is useless as it wouldn’t stop you getting E_NOTICEs.
> 
> --
> Andrea Faulds
> http://ajf.me/
