Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77312 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 89392 invoked from network); 18 Sep 2014 16:59:16 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Sep 2014 16:59:16 -0000 Authentication-Results: pb1.pair.com header.from=adrianguenter@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=adrianguenter@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.175 as permitted sender) X-PHP-List-Original-Sender: adrianguenter@gmail.com X-Host-Fingerprint: 209.85.213.175 mail-ig0-f175.google.com Received: from [209.85.213.175] ([209.85.213.175:36305] helo=mail-ig0-f175.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C4/C0-18130-36F0B145 for ; Thu, 18 Sep 2014 12:59:16 -0400 Received: by mail-ig0-f175.google.com with SMTP id h3so2520100igd.8 for ; Thu, 18 Sep 2014 09:59:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=t78b7m7My++b7VKLtBBoYrYiU5/RQq+gYnYf5d0ya+Y=; b=TK2YvzVLUIDXWt122BEB8qujU30t9SqXvzbUltRLjy867M6xt5dsElNDmWgAR9+hnY K0CHYDZIDXb+AfnhXFNYfzMVZ0oIQs/g8vu8hKrRFwlK/jE50lIQrDnCxuZMKLIcQpor mhnoHjVCBbuSIXL2jtOSdvWmcbZNGHMKWC/CcpW3q4S1mRfv//QOunrD3sJmScAo83Ip x5RAyAasIst5FVR/Kp2ud7O2tFt9QMWKZby5BNkQQwTB6GsBZEtgKvXJFA4RDPvM/Yeh PADDyC9yhjSlskBxq0qpwqRKludnVra48tPKDC19yDVhByyb8NpyNGfU7bMny8KoZ/Ww P96w== MIME-Version: 1.0 X-Received: by 10.50.33.100 with SMTP id q4mr1060785igi.8.1411059552713; Thu, 18 Sep 2014 09:59:12 -0700 (PDT) Received: by 10.107.162.73 with HTTP; Thu, 18 Sep 2014 09:59:12 -0700 (PDT) Received: by 10.107.162.73 with HTTP; Thu, 18 Sep 2014 09:59:12 -0700 (PDT) In-Reply-To: <1411047248.3023.78.camel@guybrush> References: <54E82419-931D-4F9E-8115-175EA1BDC970@darkrainfall.org> <1411047248.3023.78.camel@guybrush> Date: Thu, 18 Sep 2014 12:59:12 -0400 Message-ID: To: =?UTF-8?Q?Johannes_Schl=C3=BCter?= Cc: PHP internals , Gwynne Raskind , Andrea Faulds , Pete Boere Content-Type: multipart/alternative; boundary=089e0158b034658f1f050359e7e3 Subject: Re: [PHP-DEV] [RFC] Implicit isset() in Shorthand Ternary Operator From: adrianguenter@gmail.com (Adrian Guenter) --089e0158b034658f1f050359e7e3 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable >On Sep 18, 2014 9:36 AM, "Johannes Schl=C3=BCter" wrote: > > On Thu, 2014-09-18 at 12:41 +0100, Andrea Faulds wrote: > > We could use a function *syntax*, though, but I don=E2=80=99t like this= idea. > > coalesce() and ifsetor() are both ugly to me, and it=E2=80=99s not supe= r > > obvious what they do: > > > > var_dump(coalesce($_GET[=E2=80=98foobar=E2=80=99], 3)); > > > > vs. > > > > var_dump($_GET[=E2=80=98foobar=E2=80=99] ?? 3); > > > > ?? also has the advantage of being shorter. > > > If you don't now what ?? does it's far from obvious. coalesce is a term > that can be put into google and will deliver results. > > johannes It would (I assume) be described as such on the Comparison Operators manual page, leading one to Google "coalesce". If I don't know what an unfamiliar operator does in a language, its operators documentation page is a logical first stop. --089e0158b034658f1f050359e7e3--