xref: /PHP-8.3/Zend/tests/enum/unserialize.phpt (revision 269c8dac)
1--TEST--
2Enum unserialize
3--FILE--
4<?php
5
6enum Foo {
7    case Bar;
8    case Quux;
9}
10
11$bar = unserialize('E:7:"Foo:Bar";');
12var_dump($bar);
13var_dump($bar === Foo::Bar);
14
15$quux = unserialize('E:8:"Foo:Quux";');
16var_dump($quux);
17var_dump($quux === Foo::Quux);
18
19?>
20--EXPECT--
21enum(Foo::Bar)
22bool(true)
23enum(Foo::Quux)
24bool(true)
25