note 12289 deleted from function.array-pop by sniper
| From: | sniper@php.net | Date: | Mon, 03 Feb 2003 16:18:07 +0000 |
| Subject: | note 12289 deleted from function.array-pop by sniper | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-43336@lists.php.net to get a copy of this message | ||
Look out for this: array_pop will reorder the numeric keys of your array. So if you do
$a[5]="five";
$a[6]="six";
and then do array_pop($a), you now have $a[0]="five", not $a[5]="five", as you
might expect. In other words, $a does not necessarily equal array_pop(array_push($a, 1)).