1--TEST--
2Enum must not implement Serializable
3--FILE--
4<?php
5
6enum Foo implements Serializable {
7    case Bar;
8
9    public function serialize() {
10        return serialize('Hello');
11    }
12
13    public function unserialize($data) {
14        return unserialize($data);
15    }
16}
17
18var_dump(unserialize(serialize(Foo::Bar)));
19
20?>
21--EXPECTF--
22Deprecated: %s implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d
23
24Fatal error: Enums may not implement the Serializable interface in %s on line %d
25