xref: /php-src/ext/opcache/tests/bug74152.phpt (revision e9f783fc)
1--TEST--
2Bug #74152 (if statement says true to a null variable)
3--INI--
4opcache.enable=1
5opcache.enable_cli=1
6opcache.optimization_level=-1
7--EXTENSIONS--
8opcache
9--FILE--
10<?php
11
12$foo = 'foo';
13
14$bar = null;
15
16switch ($foo) {
17default:
18case 'foo':
19    if ($bar) {
20        echo 'true';
21    } else {
22        echo 'false';
23    }
24}
25?>
26--EXPECT--
27false
28