We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4171272 commit d190959Copy full SHA for d190959
ext/date/tests/bug65672.phpt
@@ -0,0 +1,25 @@
1
+--TEST--
2
+Test for bug #65672: Broken classes inherited from DatePeriod
3
+--INI--
4
+date.timezone=UTC
5
+--FILE--
6
+<?php
7
+
8
+$interval = new DateInterval('P1D');
9
+$period = new class(new DateTime, $interval, new DateTime) extends DatePeriod {
10
+ public $extra = "stuff";
11
+};
12
13
+var_dump($period->extra);
14
+$period->extra = "modified";
15
16
17
+var_dump(isset($period->dynamic1));
18
+$period->dynamic1 = "dynamic";
19
+var_dump($period->dynamic1);
20
+?>
21
+--EXPECT--
22
+string(5) "stuff"
23
+string(8) "modified"
24
+bool(false)
25
+string(7) "dynamic"
0 commit comments