php-src/Zend/tests/enum/unserialize-const.phpt
Tim Düsterhus dd8de1e726
Promote unserialize() notices to warning (#9629)
* Unserialize: Migrate "Unexpected end of serialized data" to E_WARNING

* Unserialize: Migrate "Error at offset %d of %d bytes" to E_WARNING

* Unserialize: Migrate "%s is returned from __sleep() multiple times" to E_WARNING

* Add NEWS for “Promote unserialize() notices to warning”
2022-11-15 19:36:38 +01:00

19 lines
314 B
PHP

--TEST--
Enum unserialize const
--FILE--
<?php
enum Foo {
case Bar;
const Baz = Foo::Bar;
}
var_dump(unserialize('E:7:"Foo:Baz";'));
?>
--EXPECTF--
Warning: unserialize(): Foo::Baz is not an enum case in %s on line %d
Warning: unserialize(): Error at offset 14 of 14 bytes in %s on line %d
bool(false)