Bug #77492 [Opn->Dup]: function return empty
| From: | nikic@php.net | Date: | Mon, 21 Jan 2019 12:23:59 +0000 |
| Subject: | Bug #77492 [Opn->Dup]: function return empty | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-219107@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=77492&edit=1
ID: 77492
Updated by: nikic@php.net
Reported by: poiuty at lepus dot su
Summary: function return empty
-Status: Open
+Status: Duplicate
Type: Bug
Package: opcache
Operating System: debian 9
PHP Version: 7.3.1
Block user comment: N
Private report: N
New Comment:
This is the issue mentioned in the comments of bug #77310 and will be fixed in PHP 7.3.2.
Previous Comments:
------------------------------------------------------------------------
[2019-01-20 16:41:48] poiuty at lepus dot su
Description:
------------
[opcache]
opcache.enable=1
opcache.enable_cli=1
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=4000
# php -v
PHP 7.3.1-1+0~20190113101756.25+stretch~1.gbp15aaa9 (cli) (built: Jan 13 2019 10:17:57) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.1, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.1-1+0~20190113101756.25+stretch~1.gbp15aaa9, Copyright (c) 1999-2018, by
Zend Technologies
Test script:
---------------
function testB(){
$x = ['a' => '', 'b' => ''];
$num = range(0, 9);
foreach($num as $k){
$x['a'] .= $k;
}
return $x;
}
function testA(){
$x = ['a' => '', 'b' => ''];
$num = range(0, 9);
foreach($num as $k){
$x['a'] .= $k;
}
return $x['a'];
}
// if opcache.enable=1 => string(0) ""
// if opcache.enable=0 => string(10) "0123456789"
// if call first testB() => string(10) "0123456789"
//var_dump(testB());
var_dump(testA());
full script: https://gist.github.com/poiuty/9759972fcc6bee42bbb250c03ef43e77
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=77492&edit=1