Skip to content

Commit bac1ed6

Browse files
committed
Add test for GH-17966
This was fixed via dstogov/ir#109 which was merged in cc70838.
1 parent cc70838 commit bac1ed6

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

NEWS

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ PHP NEWS
1515
- Opcache:
1616
. Fixed bug GH-15834 (Segfault with hook "simple get" cache slot and minimal
1717
JIT). (nielsdos)
18+
. Fixed bug GH-17966 (Symfony JIT 1205 assertion failure). (nielsdos)
1819

1920
- Standard:
2021
. Fix memory leaks in array_any() / array_all(). (nielsdos)

ext/opcache/tests/jit/gh17966.phpt

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
--TEST--
2+
GH-17966 (Symfony JIT 1205 assertion failure)
3+
--EXTENSIONS--
4+
opcache
5+
--INI--
6+
opcache.jit=1205
7+
--FILE--
8+
<?php
9+
function test($value, bool $test)
10+
{
11+
$value = (float) $value;
12+
13+
if ($test) {
14+
return $value * 2;
15+
}
16+
17+
return $value;
18+
}
19+
20+
var_dump(test(1.25, true));
21+
var_dump(test(1.25, false));
22+
?>
23+
--EXPECT--
24+
float(2.5)
25+
float(1.25)

0 commit comments

Comments
 (0)