1--TEST--
2Inherited DateTimeInterval serialisation with custom properties
3--FILE--
4<?php
5date_default_timezone_set("Europe/London");
6
7class MyDateInterval extends DateInterval
8{
9	public function __construct(
10		string $duration,
11		public ?bool $myProperty = null,
12	) {
13		parent::__construct($duration);
14	}
15}
16
17$d = new MyDateInterval("P1W2D", myProperty: true);
18$e = unserialize(serialize($d));
19var_dump($e->myProperty);
20?>
21--EXPECTF--
22bool(true)
23