1--TEST--
2Inherited DateTimePeriod serialisation with custom properties
3--FILE--
4<?php
5date_default_timezone_set("Europe/London");
6
7class MyDatePeriod extends DatePeriod
8{
9	public function __construct(
10		DateTimeInterface $start,
11		DateInterval $interval,
12		int $recurrences,
13		int $options = 0,
14		public ?bool $myProperty = null,
15	) {
16		parent::__construct($start, $interval, $recurrences, $options);
17	}
18}
19
20$d = new MyDatePeriod(new DateTimeImmutable(), new DateInterval("PT5S"), 5, myProperty: true);
21$e = unserialize(serialize($d));
22var_dump($e->myProperty);
23?>
24--EXPECTF--
25bool(true)
26