xref: /PHP-8.0/ext/date/tests/bug53437_var1.phpt (revision 771e5cc2)
1--TEST--
2Bug #53437 (Crash when using unserialized DatePeriod instance), variation 2
3--FILE--
4<?php
5$s = 'O:10:"DatePeriod":0:{}';
6
7$dp = unserialize($s);
8
9var_dump($dp);
10?>
11==DONE==
12--EXPECTF--
13Fatal error: Uncaught Error: Invalid serialization data for DatePeriod object in %sbug53437_var1.php:%d
14Stack trace:
15#0 [internal function]: DatePeriod->__wakeup()
16#1 %sbug53437_var1.php(%d): unserialize('O:10:"DatePerio...')
17#2 {main}
18  thrown in %sbug53437_var1.php on line %d
19