summaryrefslogtreecommitdiff
path: root/ext/opcache/tests/neg_range_inference.phpt
blob: e24ac3f7a2d3574b6ef3af0cccd6d63ea569a392 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
--TEST--
Incorrect negative range inference
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php

function test() {
    for ($i = 0; $i < 10; $i++) {
        if ($i != 5) {
            $t = (int) ($i < 5);
            var_dump($t);
        }
    }
}
test();

?>
--EXPECT--
int(1)
int(1)
int(1)
int(1)
int(1)
int(0)
int(0)
int(0)
int(0)