|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-06-09 11:35 UTC] tony2001@php.net
-Status: Open
+Status: Assigned
-Assigned To:
+Assigned To: dmitry
[2016-06-09 12:09 UTC] dmitry@php.net
[2016-06-09 12:09 UTC] dmitry@php.net
-Status: Assigned
+Status: Closed
[2016-06-22 05:58 UTC] krakjoe@php.net
[2016-07-20 11:30 UTC] davey@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Dec 21 07:00:01 2025 UTC |
Description: ------------ array_merge() changed behavior in PHP7, the reproduce script below produces references, which it didn't do in PHP5. Test script: --------------- <?php $x = 'xxx'; $d = ['test' => &$x]; unset($x); $a = ['test' => 'yyy']; $a = array_merge($a, $d); debug_zval_dump($a); ?> Expected result: ---------------- array(1) refcount(2){ ["test"]=> string(3) "xxx" refcount(2) } Actual result: -------------- array(1) refcount(2){ ["test"]=> &string(3) "xxx" refcount(1) }