#22088 [Asn->Csd]: array_shift() and the last index of the array

From: Date: Thu, 06 Feb 2003 15:29:35 +0000
Subject: #22088 [Asn->Csd]: array_shift() and the last index of the array
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-32292@lists.php.net to get a copy of this message
ID: 22088 Updated by: sniper@php.net Reported By: audrius@vpu.lt -Status: Assigned +Status: Closed Bug Type: Arrays related Operating System: Linux, Windows PHP Version: 4.3.1-dev Assigned To: sniper New Comment: This bug has been fixed in CVS. In case this was a PHP problem, snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. In case this was a documentation problem, the fix will show up soon at http://www.php.net/manual/. In case this was a PHP.net website problem, the change will show up on the PHP.net site and on the mirror sites in short time. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2003-02-06 09:06:37] sniper@php.net I'm checking this out..(verified with 4.3.1-dev) ------------------------------------------------------------------------ [2003-02-06 03:43:21] audrius@vpu.lt $m=array('a','b'); $last = array_shift ($m); $m[]='c';//or array_push ($m,'c'); print_r($m); in 4.3.0 output is: Array ( [0] => b [2] => c ) In previous php versions output was: Array ( [0] => b [1] => c ) As yuo see, index for element 'c' differs. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=22088&edit=1

« previous php.bugs (#32292) next »