xref: /PHP-8.2/ext/date/tests/bug78751.phpt (revision 89c327f8)
1--TEST--
2Bug #78751 (Serialising DatePeriod converts DateTimeImmutable)
3--FILE--
4<?php
5$oDay = new DateTimeImmutable('2019-10-25');
6$oDateInterval = DateInterval::createFromDateString('1 day');
7$oDays = new DatePeriod($oDay, $oDateInterval, $oDay->modify('+1 day'));
8$oDays = unserialize(serialize($oDays));
9var_dump(
10    $oDays->start instanceof DateTimeImmutable,
11    $oDays->end instanceof DateTimeImmutable
12);
13?>
14--EXPECT--
15bool(true)
16bool(true)
17