>On Sep 18, 2014 9:36 AM, "Johannes Schlüter" <johan...@schlueters.de>
wrote:
>
> On Thu, 2014-09-18 at 12:41 +0100, Andrea Faulds wrote:
> > We could use a function *syntax*, though, but I don’t like this idea.
> > coalesce() and ifsetor() are both ugly to me, and it’s not super
> > obvious what they do:
> >
> >     var_dump(coalesce($_GET[‘foobar’], 3));
> >
> > vs.
> >
> >     var_dump($_GET[‘foobar’] ?? 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.

Reply via email to