1
0
mirror of https://github.com/php/php-src.git synced 2026-04-14 11:32:11 +02:00
Files
archived-php-src/Zend/tests/enum/unserialize-non-enum.phpt
Ilija Tovilo 269c8dac1d Implement enums
RFC: https://wiki.php.net/rfc/enumerations

Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>

Closes GH-6489.
2021-03-17 19:08:03 +01:00

16 lines
273 B
PHP

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