ID: 5226
Updated by: cnewbill
Old-Status: Closed
Status: Feedback
Bug Type: Scripting Engine problem
Assigned To: 

Reclassifying as a feature request, regardless of whether it happens anytime soon. :)



This is a repeat of 5226, but I couldn't add anything without a password, which I 
didn't have.

In that bug, [EMAIL PROTECTED] didn't understand the example that was given. What 
happens is this: if you have


and then do array_pop($a), you now have $a[0]="five", not $a[5]="five", as I would 

Despite not understanding the example, stas answered the question: that's the way the 
zend engine works. But you don't see that as a problem?

Previous Comments:

[2000-06-28 10:20:19] [EMAIL PROTECTED]
Presently, all splice-derived functions reorder numeric keys.
There's not much to do about it, since it's the way Zend Engine handles numeric hash 
Changing it either way won't bring more consistent  functionality, so in the meantime 
it is just as it is.


[2000-06-25 19:01:02] [EMAIL PROTECTED]
AFAIU that's exactly what pop should do - pop element from array.
Why should it insert empty element on top?


[2000-06-25 18:56:19] [EMAIL PROTECTED]
  $A[1] = 'A';
  $A[2] = 'B';
  $A[3] = 'C';
  $DUMP = array_pop($A);
  for ($i=0; $i<=sizeof($A); $i++) {
    print "$i = ".$A[$i]."<br>n";


0 = A
1 = B
2 = 

but should return 

0 =
1 = A
2 = B


ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at

PHP Development Mailing List <>
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