com php-src: Add test only (bug doesn't exists in 7.1): ext/opcache/tests/bug74152.phpt
| From: | Xinchen Hui | Date: | Thu, 23 Feb 2017 04:47:15 +0000 |
| Subject: | com php-src: Add test only (bug doesn't exists in 7.1): ext/opcache/tests/bug74152.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-97158@lists.php.net to get a copy of this message | ||
Commit: be60d159b6246efc6e6b63a4a7c8426f89f84534
Author: Xinchen Hui <laruence@gmail.com> Thu, 23 Feb 2017 12:47:15 +0800
Parents: 002680d0d512784f305258b6503f6fbd156e0062
Branches: PHP-7.1 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=be60d159b6246efc6e6b63a4a7c8426f89f84534
Log:
Add test only (bug doesn't exists in 7.1)
Changed paths:
A ext/opcache/tests/bug74152.phpt
Diff:
diff --git a/ext/opcache/tests/bug74152.phpt b/ext/opcache/tests/bug74152.phpt
new file mode 100644
index 0000000..f51c26b
--- /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