mirror of
https://github.com/php/doc-en.git
synced 2026-03-23 23:32:18 +01:00
Add strict inequality check for Suit enumeration
The paragraph above explicitly states that "cases are not intrinsically backed by a scalar value"; this example demonstrates that more clearly than the others.
This commit is contained in:
committed by
Christian Weiske
parent
f7f861700c
commit
5744be5a4d
@@ -105,6 +105,8 @@ $b = Suit::Spades;
|
||||
$a === $b; // true
|
||||
|
||||
$a instanceof Suit; // true
|
||||
|
||||
$a !== 'Spades'; // true
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
|
||||
Reference in New Issue
Block a user