Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77374 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 99366 invoked from network); 20 Sep 2014 10:31:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Sep 2014 10:31:22 -0000 Authentication-Results: pb1.pair.com header.from=nikita.ppv@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=nikita.ppv@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.174 as permitted sender) X-PHP-List-Original-Sender: nikita.ppv@gmail.com X-Host-Fingerprint: 209.85.217.174 mail-lb0-f174.google.com Received: from [209.85.217.174] ([209.85.217.174:56658] helo=mail-lb0-f174.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4E/31-24334-7775D145 for ; Sat, 20 Sep 2014 06:31:20 -0400 Received: by mail-lb0-f174.google.com with SMTP id l4so4508308lbv.33 for ; Sat, 20 Sep 2014 03:31:15 -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=5NAq40B41KIAy32YCskjAWGHLp688H3zmws2Ef0MVwU=; b=0QwJXz1c28x2GTyBJcaaXX+Noc2RXbScrWcP/fJyC2+CsC09qfPmG9zZH73AYevGgm vbyMZoWjj3HuPCYbub+HGs2WwrYAB3dwT/T+A7wmRmrLfMprgr4sUE9sGxGodg3u6Z4U IUeWglyH46I+wwJw+jlvyQqNwXclZAFv4EF9D0i68GC380YF/gRKWBALH3CZDrwpd22D AEtLthl0Bg9VB32gRHjCB9wP43zNd26tZZcVP4G+2TBLWU4OM9GQLinc57pteuhtF4jU 8VE5m8DL1G+shGrfhIHHZYOqT+vgsNqNrv3yDmKvVixjZElM9FaLOUtwjO/C/cXb8EAM KWqg== MIME-Version: 1.0 X-Received: by 10.152.28.199 with SMTP id d7mr12404347lah.55.1411209075712; Sat, 20 Sep 2014 03:31:15 -0700 (PDT) Received: by 10.25.218.204 with HTTP; Sat, 20 Sep 2014 03:31:15 -0700 (PDT) In-Reply-To: References: <63FFDE7B-4156-4BE2-9754-3F32E148C7B8@ajf.me> Date: Sat, 20 Sep 2014 12:31:15 +0200 Message-ID: To: Patrick Schaaf Cc: Andrea Faulds , internals Content-Type: multipart/alternative; boundary=089e0160b432a9667a05037cb764 Subject: Re: [PHP-DEV] [VOTE][RFC] Null Coalesce Operator From: nikita.ppv@gmail.com (Nikita Popov) --089e0160b432a9667a05037cb764 Content-Type: text/plain; charset=UTF-8 On Sat, Sep 20, 2014 at 9:40 AM, Patrick Schaaf wrote: > Am 20.09.2014 01:35 schrieb "Andrea Faulds" : > > > > https://wiki.php.net/rfc/isset_ternary#vote > > Hi, > > got a question after being bitten my the issue yesterday in the context of > the "@yadda ?: 'default'" form yesterday: > > What about yadda that results, at the moment, in fatal errors?? Things like > static::$missingproperty, $this->missingmethod(), and other stuff? > > Will the ?? operator > A) make these non-fatal > B) silently fatal (like now when @ is used) > C) loudly fatal (like when no @ is used) > D) depends on what fatal it is? > $this->missingmethod() ?? null will continue to be (loudly) fatal (or recoverable fatal, once a recent RFC is merged). static::$missingproperty ?? null will not throw an error, as it is subject to isset(). > To me the most annoying case here, not only in relation to ?? of course, is > the different behaviour of $this->missingproperty and > someclass::$missingproperty, with the latter being fatal, but easily > provocable by a call to unset(someclass::$missingproperty earlier in the > code. > It's not possible to unset a static property, see http://3v4l.org/PkD36. Which is probably also why accessing an undefined static property is fatal as well ;) Nikita --089e0160b432a9667a05037cb764--