Re: PHP7 Coalesce operator
| From: | Andrea Faulds | Date: | Mon, 23 Nov 2015 22:43:17 +0000 |
| Subject: | Re: PHP7 Coalesce operator | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-89356@lists.php.net to get a copy of this message | ||
Hi,
shadda wrote:
That’s not a bad idea, but it’s still limited in certain cases, where your list of possibles is, lets say, complex. At this point, I think you guys get what I’m after, and I’m wondering if anyone else finds the idea as useful I as do. In fact, if it didn’t break the One Law of PHP (thou shalt not break BC), I might even suggest just giving ?: the same super power as ??, in not throwing a notice.This is what my RFC for the null coalesce operator was originally going to do: make ?: use empty(). However, it was deemed a better idea to add a new operator, ??, which uses isset(), since a falsy value != a missing value. Thanks. -- Andrea Faulds http://ajf.me/