Re: [VOTE][RFC] Null Coalesce Operator
| From: | Patrick Schaaf | Date: | Sat, 20 Sep 2014 07:40:27 +0000 |
| Subject: | Re: [VOTE][RFC] Null Coalesce Operator | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-77370@lists.php.net to get a copy of this message | ||
Am 20.09.2014 01:35 schrieb "Andrea Faulds" <ajf@ajf.me>:
>
> 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?
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.
best regards
Patrick