|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2014-11-19 22:32 UTC] rasmus@php.net
-Status: Open
+Status: Not a bug
[2014-11-19 22:32 UTC] rasmus@php.net
[2014-11-19 22:50 UTC] mberding at dtoolbox dot com
-Type: Bug
+Type: Documentation Problem
[2014-11-19 22:50 UTC] mberding at dtoolbox dot com
[2014-11-19 23:00 UTC] aharvey@php.net
[2014-11-19 23:15 UTC] yohgaki@php.net
[2014-11-20 01:20 UTC] yohgaki@php.net
[2014-11-20 01:27 UTC] yohgaki@php.net
[2014-11-20 01:35 UTC] yohgaki@php.net
[2014-11-20 01:42 UTC] yohgaki@php.net
[2014-11-20 02:07 UTC] gabri dot ns at gmail dot com
[2014-11-20 02:24 UTC] rasmus@php.net
[2014-11-21 03:03 UTC] yohgaki@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Dec 13 23:00:01 2025 UTC |
Description: ------------ In the code below the last element in the $a array is replaced with a copy of the second-to-last element. Tested and confirmed in PHP versions: 5.3.3, 5.4.34, 5.6.2 Tested OS: CentOS 6.5, 7 Test script: --------------- //Test Script: //------------ $a = array(1,2,3); foreach($a AS &$y) { $y = $y*2; } foreach($a AS $y) { echo $y.', '; } Expected result: ---------------- 2,4,6, Actual result: -------------- 2,4,4,