xref: /PHP-8.2/Zend/tests/enum/instanceof.phpt (revision 269c8dac)
1--TEST--
2Enum instanceof
3--FILE--
4<?php
5
6enum Foo {
7    case Bar;
8}
9
10enum Baz {
11    case Qux;
12}
13
14var_dump(Foo::Bar instanceof Foo);
15var_dump(Baz::Qux instanceof Baz);
16
17var_dump(Foo::Bar instanceof Baz);
18var_dump(Baz::Qux instanceof Foo);
19
20?>
21--EXPECT--
22bool(true)
23bool(true)
24bool(false)
25bool(false)
26