com php-src: Merge branch 'PHP-7.4': Zend/zend_vm_def.h Zend/zend_vm_execute.h ext/opcache/tests/bool_not _cv.phpt
| From: | Dmitry Stogov | Date: | Mon, 18 Nov 2019 08:29:38 +0000 |
| Subject: | com php-src: Merge branch 'PHP-7.4': Zend/zend_vm_def.h Zend/zend_vm_execute.h ext/opcache/tests/bool_not _cv.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-109278@lists.php.net to get a copy of this message | ||
Commit: 8bf663d3b2e9ff0400c1207acfdc81a7740476c5
Author: Dmitry Stogov <dmitry@zend.com> Mon, 18 Nov 2019 11:29:38 +0300
Parents: f826bbde93c55d08de9d962946d00dd0cf5d98a1 be6fb1387399d4066123aa4cdb84056793aa1a11
Branches: master
Link: http://git.php.net/?p=php-src..git;a=commitdiff;h=8bf663d3b2e9ff0400c1207acfdc81a7740476c5
Log:
Merge branch 'PHP-7.4'
* PHP-7.4:
Fix $x = (bool)$x; for undefined with opcache
Changed paths:
MM Zend/zend_vm_def.h
MM Zend/zend_vm_execute.h
AM ext/opcache/tests/bool_not_cv.phpt
Diff:
diff --cc ext/opcache/tests/bool_not_cv.phpt
index 00000000000,ed3cf835147..cc28edcc01f
mode 000000,100644..100644
--- a/ext/opcache/tests/bool_not_cv.phpt
+++ b/ext/opcache/tests/bool_not_cv.phpt
@@@ -1,0 -1,34 +1,34 @@@
+ --TEST--
+ $v = !$v/(bool)$v checks for undefined variables
+ --INI--
+ opcache.enable=1
+ opcache.enable_cli=1
+ opcache.file_cache_only=0
+ --SKIPIF--
+ <?php require_once('skipif.inc'); ?>
+ --FILE--
+ <?php
+ function undef_negation() {
+ echo "In undef_negation\n";
+ $v = !$v;
+ var_export($v);
+ echo "\n";
+ }
+ function undef_bool_cast() {
+ echo "In undef_bool_cast\n";
+ $v = (bool)$v;
+ var_export($v);
+ echo "\n";
+ }
+ undef_negation();
+ undef_bool_cast();
+ ?>
+ --EXPECTF--
+ In undef_negation
+
-Notice: Undefined variable: v in %s on line 4
++Warning: Undefined variable: v in %s on line 4
+ true
+ In undef_bool_cast
+
-Notice: Undefined variable: v in %s on line 10
++Warning: Undefined variable: v in %s on line 10
+ false