|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-02-16 00:58 UTC] requinix@php.net
-Status: Open
+Status: Feedback
-Package: Unknown/Other Function
+Package: Scripting Engine problem
[2016-02-16 00:58 UTC] requinix@php.net
[2016-02-16 01:16 UTC] tim at zaremedia dot com
-Status: Feedback
+Status: Open
[2016-02-16 01:16 UTC] tim at zaremedia dot com
[2016-02-16 03:03 UTC] laruence@php.net
[2016-02-16 03:03 UTC] laruence@php.net
-Status: Open
+Status: Closed
[2016-07-20 11:33 UTC] davey@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 08:00:01 2025 UTC |
Description: ------------ When compact() is used with references, those references are maintained in the new array in php7 and not in 5.6 Test script: --------------- <?php $foo = 45; $foo_reference =& $foo; $array = compact('foo_reference'); print_r($array); $foo = 50; print_r($array); Expected result: ---------------- PHP 5.6.17 ---------- Array ( [foo_reference] => 45 ) Array ( [foo_reference] => 45 ) Actual result: -------------- PHP 7.0.3 --------- Array ( [foo_reference] => 45 ) Array ( [foo_reference] => 50 )