1--TEST--
2DatePeriod modify readonly property
3--FILE--
4<?php
5$dp = new \DatePeriod(
6	new \DateTimeImmutable("2023-01-13"),
7	DateInterval::createFromDateString('+1 month'),
8	new \DateTimeImmutable("2023-12-31"),
9);
10
11try {
12	$dp->interval = "foo";
13} catch( \Error $e ) {
14	echo $e::class, ': ', $e->getMessage(), "\n";
15}
16
17try {
18	$foo =& $dp->interval;
19} catch( \Error $e ) {
20	echo $e::class, ': ', $e->getMessage(), "\n";
21}
22?>
23--EXPECTF--
24Error: Cannot modify readonly property DatePeriod::$interval
25Error: Cannot modify readonly property DatePeriod::$interval
26