xref: /PHP-7.3/ext/opcache/tests/bug74152.phpt (revision be60d159)
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--SKIPIF--
8<?php require_once('skipif.inc'); ?>
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