xref: /PHP-8.0/Zend/tests/bug78271.phpt (revision e7e66d52)
1--TEST--
2Bug #78271: Invalid result of if-else
3--FILE--
4<?php
5function test($a, $b){
6    if ($a==10) {
7        $w="x";
8    } else {
9        $w="y";
10    }
11
12    if ($b) {
13        $d1="none";
14        $d2="block";
15    } else {
16        $d1="block";
17        $d2="none";
18    }
19
20    echo $d2.$b."\n";
21
22}
23
24test(1, 1);
25?>
26--EXPECT--
27block1
28