xref: /PHP-8.4/ext/opcache/tests/jit/bug77857.phpt (revision c16ad918)
1--TEST--
2Bug #77857 (Wrong result if executed with JIT)
3--INI--
4opcache.enable=1
5opcache.enable_cli=1
6opcache.file_update_protection=0
7opcache.jit=1205
8--EXTENSIONS--
9opcache
10--FILE--
11<?php
12function test() {
13    $arr = array_fill(0, 1, 1.0);
14    $y = 0.0;
15    foreach ($arr as $v) {
16        $tmp = 1.0 * $v;
17        var_dump($tmp);
18        $y = $tmp/1.0;
19    }
20    return $y;
21}
22var_dump(test());
23?>
24--EXPECT--
25float(1)
26float(1)
27