|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2019-04-08 08:49 UTC] nikic@php.net
[2019-04-08 16:07 UTC] laruence@php.net
[2019-04-08 16:07 UTC] laruence@php.net
-Status: Open
+Status: Closed
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 20:00:01 2025 UTC |
Description: ------------ The test script ends with a wrong result if JIT is enabled as follows: $ ./sapi/cli/php -n -derror_reporting=-1 -dzend_extension=`pwd`/modules/opcache.so -dopcache.enable_cli=1 -dopcache.jit_buffer_size=32M Test.php Note: without JIT (i.e. remove -dopcache.jit_buffer_size=32M), it ends with the expected result. // System info $ cat /proc/cpuinfo | grep '^model name' model name : Intel(R) Core(TM) i5-3337U CPU @ 1.80GHz $ cat /etc/redhat-release CentOS Linux release 7.6.1810 (Core) // Commit id $ git log --oneline -n1 7b58e43 Merge branch 'PHP-7.4' Test script: --------------- <?php function test() { $arr = array_fill(0, 1, 1.0); $y = 0.0; foreach ($arr as $v) { $tmp = 1.0 * $v; var_dump($tmp); $y += $tmp / 1.0; } return $y; } var_dump(test()); Expected result: ---------------- float(1) float(1) Actual result: -------------- float(255814795264) Notice: Undefined variable: tmp in /.../Test.php on line 8 float(0) // the value in the first line ($tmp) is changed arbitrary by each execution.