note 124100 deleted from language.operators.comparison by cmb
| From: | cmb@php.net | Date: | Sun, 08 Dec 2019 11:35:19 +0000 |
| Subject: | note 124100 deleted from language.operators.comparison by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-213472@lists.php.net to get a copy of this message | ||
Note Submitter: Tero Lahtinen
----
?? this operator does not emit a notice if the left-hand side value does not exist, just like
isset()
However, note that
$a = (float) $foo['bar'] ?? 1;
Does emit a warning, as the (float) $foo['bar'] is evaluated first, e.g. it is equivalent
to
$a = ( (float) $foo['bar']) ?? 1;
Not to
$a (float) ( $foo['bar'] ?? 1);