|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2012-06-08 12:41 UTC] Sjon at hortensius dot net
[2012-06-08 23:27 UTC] nikic@php.net
[2012-06-08 23:27 UTC] nikic@php.net
-Status: Open
+Status: Not a bug
[2012-06-09 00:26 UTC] marti dot markov at gmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 17 01:00:01 2025 UTC |
Description: ------------ I have found this problem with 5.3.10 and got the latest GIT head revision and the problem was still there. When I try and change the value of the key it will not update it in the array, even though that I use the key as a reference. Test script: --------------- $array = ( 'a' => 'Hello', 'b' => 'World'); array_walk($array, 'adda'); function adda(&$value, &$key) { $key = "a".$key; } Expected result: ---------------- $array = ( 'aa' => 'Hello', 'ab' => 'World'); Actual result: -------------- $array = ( 'a' => 'Hello', 'b' => 'World');