Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:89295 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 62106 invoked from network); 22 Nov 2015 20:42:03 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Nov 2015 20:42:03 -0000 X-Host-Fingerprint: 176.249.187.88 unknown Received: from [176.249.187.88] ([176.249.187.88:3436] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 20/F5-23339-A9822565 for ; Sun, 22 Nov 2015 15:42:02 -0500 Message-ID: <20.F5.23339.A9822565@pb1.pair.com> To: internals@lists.php.net References: <4D5D4A6D-1E94-4893-B1DF-7A8C616C871A@gmail.com> Date: Sun, 22 Nov 2015 20:41:59 +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: <4D5D4A6D-1E94-4893-B1DF-7A8C616C871A@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Posted-By: 176.249.187.88 Subject: Re: PHP7 Coalesce operator From: ajf@ajf.me (Andrea Faulds) Hi, shadda wrote: > I had a question-suggestion based around the cool new operator we’re getting in PHP7, the ?? operator, which as I understand it is the functional equivalent to perl’s // operator; in that they both test for whether or not a variable is defined, rather than it’s truthiness. This is not strictly correct. Though something of a misnomer, the 'null coalesce operator' checks if a variable doesn't exist, but also that it is not null, i.e. it functions like isset(). Thanks. -- Andrea Faulds http://ajf.me/