Skip to content

Commit 55625a3

Browse files
committed
Fix test
1 parent 0715279 commit 55625a3

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

ext/opcache/tests/jit/bug80634.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ if (PHP_OS_FAMILY == 'Windows') die('skip Preloading is not supported on Windows
1919
$v = new SomeClass(5);
2020
?>
2121
--EXPECTF--
22-
Fatal error: Uncaught Error: Writing to DatePeriod->interval is unsupported in %spreload_bug80634.inc:7
22+
Fatal error: Uncaught Error: Cannot modify readonly property DatePeriod::$current in %spreload_bug80634.inc:7
2323
Stack trace:
2424
#0 %sbug80634.php(2): SomeClass->__construct(5)
2525
#1 {main}
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?php
22
class SomeClass extends \DatePeriod {
3-
public $interval;
3+
public readonly ?DateTimeInterface $current;
44

55
public function __construct(int $v) {
66
parent::__construct(new \DateTime('2020-12-31'), new \DateInterval("P1Y"), 1);
7-
$this->interval = $v;
8-
var_dump($this->interval);
7+
$this->current = $v;
8+
var_dump($this->current);
99
}
10-
}
10+
}

0 commit comments

Comments
 (0)