summaryrefslogtreecommitdiff
path: root/ext/opcache/tests/bool_cp_in_pass1.phpt
blob: edd08aeef605daaa75efb14a8a87878653367eaf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--TEST--
Incorrect constant propagation on BOOL in pass 1
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
function test($foo) {
    $bar = 0;
    if ($bar === 1 && $foo && PHP_SAPI !== 'cgi') {
        echo "bar\n";
    }
    echo "foo\n";
}
test(1);
?>
--EXPECT--
foo