1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Add test for GH-17966

This was fixed via https://github.com/dstogov/ir/pull/109 which was
merged in cc70838dc9.
This commit is contained in:
Niels Dossche
2025-03-06 21:54:30 +01:00
parent cc70838dc9
commit bac1ed6579
2 changed files with 26 additions and 0 deletions

1
NEWS
View File

@@ -15,6 +15,7 @@ PHP NEWS
- Opcache:
. Fixed bug GH-15834 (Segfault with hook "simple get" cache slot and minimal
JIT). (nielsdos)
. Fixed bug GH-17966 (Symfony JIT 1205 assertion failure). (nielsdos)
- Standard:
. Fix memory leaks in array_any() / array_all(). (nielsdos)

View File

@@ -0,0 +1,25 @@
--TEST--
GH-17966 (Symfony JIT 1205 assertion failure)
--EXTENSIONS--
opcache
--INI--
opcache.jit=1205
--FILE--
<?php
function test($value, bool $test)
{
$value = (float) $value;
if ($test) {
return $value * 2;
}
return $value;
}
var_dump(test(1.25, true));
var_dump(test(1.25, false));
?>
--EXPECT--
float(2.5)
float(1.25)