xref: /php-src/ext/opcache/tests/jit/cmp_004.phpt (revision c16ad918)
1--TEST--
2JIT CMP: 004 Comparisons inside conditional statement
3--INI--
4opcache.enable=1
5opcache.enable_cli=1
6opcache.file_update_protection=0
7opcache.protect_memory=1
8--EXTENSIONS--
9opcache
10--FILE--
11<?php
12function foo(bool $test, int $x) {
13    if (($test ? $x >= 1 : $x > 1)) {
14        return 1;
15    }
16    return 0;
17}
18var_dump(foo(true, 9));
19?>
20--EXPECT--
21int(1)
22