Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions language/operators/comparison.xml
Original file line number Diff line number Diff line change
Expand Up @@ -500,11 +500,20 @@ if (isset($_POST['action'])) {
<replaceable>expr2</replaceable> if <replaceable>expr1</replaceable> is
&null;, and <replaceable>expr1</replaceable> otherwise.
</para>
<para>
In particular, this operator does not emit a notice or warning if the left-hand side
value does not exist, just like <function>isset</function>. This is especially
useful on array keys.
</para>
<simpara>
In particular, this operator does not emit a notice or warning if the
left-hand side value does not exist, just like <function>isset</function>.
This is especially useful on array keys.
This suppression only applies when the left-hand operand is a variable
expression: a combination of variable accesses
(<literal>$var</literal>), array accesses (<literal>$var['key']</literal>),
property accesses (<literal>$var->prop</literal>), null-safe property and
method accesses (<literal>$var?->prop</literal>,
<literal>$var?->method()</literal>), static property accesses
(<literal>Class::$prop</literal>), and function/method calls.
If the left-hand operand is a more complex expression (such as a
concatenation or arithmetic operation), warnings will not be suppressed.
</simpara>
<note>
<simpara>
Please note that the null coalescing operator is an expression, and that it
Expand Down
Loading