Hi everyone,

I encountered a problem today, which seems to be a well known
"feature", but I didn't find _one_ comment of a responsible person
on this by looking into the bug-database!

The snippet

$bla = array( "5" => "green", "9" => "orange" );
var_dump( $bla );
array_shift( $bla );
var_dump( $bla );   

array(2) {
string(5) "green"
string(6) "orange"
array(1) {
string(6) "orange"

The array_shift changes the integer-keys of the array. Likewise behaviour
with array_pop and array_slice.
Would anyone of the core-coders be so kind and give me a hopefully
reasonable answer to this problem? I'm not very fond of this...


| Alexander Wirtz           | eMail: [EMAIL PROTECTED]                |
| web@ctive GmbH            | WWW:   http://www.web-active.com           |

PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to