summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXinchen Hui <laruence@gmail.com>2017-02-23 12:47:15 +0800
committerXinchen Hui <laruence@gmail.com>2017-02-23 12:47:15 +0800
commitbe60d159b6246efc6e6b63a4a7c8426f89f84534 (patch)
treefd2a8ecbc98a3435703799d62e08a9b2bd02f888
parent002680d0d512784f305258b6503f6fbd156e0062 (diff)
downloadphp-git-be60d159b6246efc6e6b63a4a7c8426f89f84534.tar.gz
Add test only (bug doesn't exists in 7.1)
-rw-r--r--ext/opcache/tests/bug74152.phpt27
1 files changed, 27 insertions, 0 deletions
diff --git a/ext/opcache/tests/bug74152.phpt b/ext/opcache/tests/bug74152.phpt
new file mode 100644
index 0000000000..f51c26b621
--- /dev/null
+++ b/ext/opcache/tests/bug74152.phpt
@@ -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