Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:99596 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 4450 invoked from network); 21 Jun 2017 19:44:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Jun 2017 19:44:39 -0000 Authentication-Results: pb1.pair.com header.from=php@golemon.com; sender-id=softfail Authentication-Results: pb1.pair.com smtp.mail=php@golemon.com; spf=softfail; sender-id=softfail Received-SPF: softfail (pb1.pair.com: domain golemon.com does not designate 209.85.128.176 as permitted sender) X-PHP-List-Original-Sender: php@golemon.com X-Host-Fingerprint: 209.85.128.176 mail-wr0-f176.google.com Received: from [209.85.128.176] ([209.85.128.176:36638] helo=mail-wr0-f176.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E0/FE-13828-5ACCA495 for ; Wed, 21 Jun 2017 15:44:38 -0400 Received: by mail-wr0-f176.google.com with SMTP id c11so93286470wrc.3 for ; Wed, 21 Jun 2017 12:44:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=golemon-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=8tdXfHvUTuZDMS2fXbvPlXgty0neBftwSiJoOxjKjXA=; b=ZmXwhBeBGmHJC7cf6EyGFGBbmrvPWTJAHk6rpq0O/svgLeB5XM7QaqQfmhd9ygJrdl PbzBy3Cn/F4rTelB4c9CFQ2q++0GyRFTyOZycZYbpWR6yj1AlnlFpcq47ErO+ofDhceb nPa3l9Bjx2regOTLfZFGfR877fOHA1pQqPjPPOCwgpmfKN498hFylUopLz0I6cMoyj/v 05eWnd03mdakgwurqNERMg3kLGtGO9/LzpnApNYuJU88xXRYe5w+XICM451uCXnkCHI9 886gZYnRnIgzxcdd5DoCR6nQizpYcls3jkunVGc5v823kbSXugMw0RcxJKeu15AkDK+c aD6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=8tdXfHvUTuZDMS2fXbvPlXgty0neBftwSiJoOxjKjXA=; b=OQDYh6wnpxoiOexIBuIRgjugqA07rpFNzKADJ11C/cps2M14a99HCyIcyvTOq5FELl f0vwKEVtnn4cyw0NAiJ7oiPXrESd3gwx7++IfQfszusXeJWH+5DPFcbvu3QtD7/i1DNZ BIE3GvuGhuJz7q6sdBucQc7P+x2xtvBNXFCZ2tGapjQsEeC6yo3im5fkgbcG+n1vMAQD WqGYZjzTBVTiJ5Lx+hYF8rH9UoNg65vCzfKdBxRHuklHGLroMUEaKvCLJ7yASHDqvNce pt6yq0RiTuAli5nHjIgOZbnuHtGqvRdTGVZEFOGw1RLlG0aqL1UHlXYHHHR9EFDVRrCh YhPA== X-Gm-Message-State: AKS2vOzU2JAW1AwUGVVGZoEU+29YISIdyE+av+noWLE1UEAgc0+lG2E+ Ls4Y/H9xYZEwngHssVmd8Ibk1qjA+nzHJtA= X-Received: by 10.223.129.47 with SMTP id 44mr24449072wrm.179.1498074274403; Wed, 21 Jun 2017 12:44:34 -0700 (PDT) MIME-Version: 1.0 Sender: php@golemon.com Received: by 10.223.172.226 with HTTP; Wed, 21 Jun 2017 12:44:33 -0700 (PDT) X-Originating-IP: [206.252.215.26] In-Reply-To: <27.FD.13828.277AA495@pb1.pair.com> References: <27.FD.13828.277AA495@pb1.pair.com> Date: Wed, 21 Jun 2017 15:44:33 -0400 X-Google-Sender-Auth: 9HLKfJbfaDCILZGp-D7EmOIiITU Message-ID: To: Andrea Faulds Cc: PHP internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] [RFC] Unary null coalescing operator From: pollita@php.net (Sara Golemon) On Wed, Jun 21, 2017 at 1:05 PM, Andrea Faulds wrote: > Here's a small RFC for a small feature, which I've wondered about for a > while: https://wiki.php.net/rfc/unary_null_coalescing_operator > > What do you think of it? > I think that `if ($_GET['x']?? === 1)` looks and feels a lot like `if (@$_GET['x'] === 1)`... Yes, the latter has runtime performance issues and will still send notices to error handlers and logs. But perhaps if we're going to extend syntax, the syntax could be something along the lines of: if (@@$_GET['x'] === 1) The double @@ could indicate "No, really, don't send any kind of warning (or lower) anywhere. Just deal with it. And as a bonus, the @@ syntax is valid in older PHPs (acting like a single @). -Sara