#22088 [Com]: array_shift() and the last index of the array
| From: | brian at n2solvingproblems dot com | Date: | Wed, 05 Mar 2003 17:43:59 +0000 |
| Subject: | #22088 [Com]: array_shift() and the last index of the array | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-34905@lists.php.net to get a copy of this message | ||
ID: 22088
Comment by: brian at n2solvingproblems dot com
Reported By: audrius at vpu dot lt
Status: Closed
Bug Type: Arrays related
Operating System: Linux, Windows
PHP Version: 4.3.1-dev
Assigned To: sniper
New Comment:
This was reported as fixed on 6 Feb 2003, I just upgraded to 4.3.1
release version, which was release on 17 Feb 2003, and the bug still
exists (Linux Redhat 7.2).
Brian
Previous Comments:
------------------------------------------------------------------------
[2003-02-06 09:29:34] sniper@php.net
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.
------------------------------------------------------------------------
[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 at vpu dot 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