]> granicus.if.org Git - php/commitdiff
Add test only (bug doesn't exists in 7.1)
authorXinchen Hui <laruence@gmail.com>
Thu, 23 Feb 2017 04:47:15 +0000 (12:47 +0800)
committerXinchen Hui <laruence@gmail.com>
Thu, 23 Feb 2017 04:47:15 +0000 (12:47 +0800)
ext/opcache/tests/bug74152.phpt [new file with mode: 0644]

diff --git a/ext/opcache/tests/bug74152.phpt b/ext/opcache/tests/bug74152.phpt
new file mode 100644 (file)
index 0000000..f51c26b
--- /dev/null
@@ -0,0 +1,27 @@
+--TEST--
+Bug #74152 (if statement says true to a null variable)
+--INI--
+opcache.enable=1
+opcache.enable_cli=1
+opcache.optimization_level=-1
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+
+$foo = 'foo';
+
+$bar = null;
+
+switch ($foo) {
+default:
+case 'foo':
+       if ($bar) {
+               echo 'true';
+       } else {
+               echo 'false';
+       }
+}
+?>
+--EXPECT--
+false