Skip to content

Commit 5744be5

Browse files
kevindecapitecweiske
authored andcommitted
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.
1 parent f7f8617 commit 5744be5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

language/enumerations.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ $b = Suit::Spades;
105105
$a === $b; // true
106106
107107
$a instanceof Suit; // true
108+
109+
$a !== 'Spades'; // true
108110
?>
109111
]]>
110112
</programlisting>

0 commit comments

Comments
 (0)