Re: Re: PHP 4.0 Bug #5226 Updated: arrayfields reorganized when using array_pop
| From: | Stanislav Malyshev | Date: | Tue, 27 Jun 2000 13:40:43 +0000 |
| Subject: | Re: Re: PHP 4.0 Bug #5226 Updated: arrayfields reorganized when using array_pop | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-22474@lists.php.net to get a copy of this message | ||
AZ>> $a[1] = 1;
AZ>> $a[2] = 2;
AZ>> $a[3] = 3;
AZ>> array_pop($a);
Argh. Now I see. Ugly. And the code for _phpi_pop is extremely weird. Why
won't we just delete the element and go on? Do we need indeed to create
entirely new hash for that?
Anyway, I agree here that is should preserve keys and order. Though
shift/unshift probably shouldn't.
--
Stanislav Malyshev stas@zend.com
+972-3-6139665