mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00

RFC: https://wiki.php.net/rfc/enumerations Co-authored-by: Nikita Popov <nikita.ppv@gmail.com> Closes GH-6489.
18 lines
313 B
PHP
18 lines
313 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
|
|
|
|
Notice: unserialize(): Error at offset 14 of 14 bytes in %s on line %d
|
|
bool(false)
|