xref: /PHP-8.1/ext/opcache/tests/jit/noval_001.phpt (revision e9f783fc)
1--TEST--
2JIT NOVAL: 001 (bug in zend_jit_compute_false_dependencies())
3--INI--
4opcache.enable=1
5opcache.enable_cli=1
6opcache.file_update_protection=0
7opcache.jit_buffer_size=1M
8opcache.protect_memory=1
9;opcache.jit_debug=257
10--EXTENSIONS--
11opcache
12--FILE--
13<?php
14class Foo {
15    const X = false;
16
17    static function bar() {
18        $count = 0;
19        if (self::X) {
20            $count = intval(9223372036854775807);
21        }
22        if (self::X) {
23           $count = 2;
24        }
25        if ($count != 0) {
26            return "bug";
27        }
28        return "ok";
29    }
30}
31var_dump(Foo::bar());
32?>
33--EXPECT--
34string(2) "ok"
35
36