#22088 [Opn->Asn]: array_shift() and the last index of the array
| From: | sniper@php.net | Date: | Thu, 06 Feb 2003 15:06:37 +0000 |
| Subject: | #22088 [Opn->Asn]: array_shift() and the last index of the array | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-32291@lists.php.net to get a copy of this message | ||
ID: 22088
Updated by: sniper@php.net
Reported By: audrius@vpu.lt
-Status: Open
+Status: Assigned
Bug Type: Arrays related
Operating System: Linux, Windows
-PHP Version: 4.3.0
+PHP Version: 4.3.1-dev
-Assigned To:
+Assigned To: sniper
New Comment:
I'm checking this out..(verified with 4.3.1-dev)
Previous Comments:
------------------------------------------------------------------------
[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