Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:89356 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 31961 invoked from network); 23 Nov 2015 22:43:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Nov 2015 22:43:31 -0000 X-Host-Fingerprint: 176.249.187.88 unknown Received: from [176.249.187.88] ([176.249.187.88:3757] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AA/9D-47837-C8693565 for ; Mon, 23 Nov 2015 17:43:29 -0500 Message-ID: To: internals@lists.php.net References: <4D5D4A6D-1E94-4893-B1DF-7A8C616C871A@gmail.com> <20.F5.23339.A9822565@pb1.pair.com> <457D19DF-746D-40D0-BA0F-7064D265901E@gmail.com> <7641479E-65DD-4B5F-B1E5-2A0D4E91D69B@gmail.com> <13FE7176-D9B2-43D2-89C9-F873EF6BF141@gmail.com> Date: Mon, 23 Nov 2015 22:43:17 +0000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:42.0) Gecko/20100101 Firefox/42.0 SeaMonkey/2.39 MIME-Version: 1.0 In-Reply-To: <13FE7176-D9B2-43D2-89C9-F873EF6BF141@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Posted-By: 176.249.187.88 Subject: Re: [PHP-DEV] PHP7 Coalesce operator From: ajf@ajf.me (Andrea Faulds) 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/