| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             [2019-01-21 12:23 UTC] nikic@php.net
 
-Status: Open
+Status: Duplicate
  [2019-01-21 12:23 UTC] nikic@php.net
  | 
    |||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 07:00:01 2025 UTC | 
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