ID:               46906
 Updated by:       j...@php.net
 Reported By:      malte dot hamburg at gmx dot de
-Status:           Open
+Status:           Bogus
 Bug Type:         Arrays related
 Operating System: WinXP
 PHP Version:      5.2.5
 New Comment:

Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.

Works fine in 5.2.8.


Previous Comments:
------------------------------------------------------------------------

[2008-12-19 10:12:06] malte dot hamburg at gmx dot de

Description:
------------
After using "array_unshift" (and the first key is numeric) the first
(old) key of the array has  changed.

We use PHP 5.2.5 (API 20041225)


Reproduce code:
---------------
$test = array("4711" => "4711", "Hello" => "Hello");
print_r($test);
array_unshift($test, array(null => "New text"));
print_r($test);

Expected result:
----------------
Array ( [4711] => 4711 [Hello] => Hello ) 
Array ( [0] => Array ( [] => New text ) [1] => 4711 [Hello] => Hello ) 

Actual result:
--------------
Array ( [4711] => 4711 [Hello] => Hello ) 
Array ( [0] => Array ( [] => New text ) [4711] => 4711 [Hello] => Hello
) 


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=46906&edit=1

Reply via email to