com php-src: Add test only (bug doesn't exists in 7.1): ext/opcache/tests/bug74152.phpt
[email protected] (Xinchen Hui)
| Newsgroups | php.cvs |
|---|---|
| Message-ID | <[email protected]> |
Commit: be60d159b6246efc6e6b63a4a7c8426f89f84534 Author: Xinchen Hui <[email protected]> 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