Re: Re: PHP 4.0 Bug #5226 Updated: arrayfields reorganized when using array_pop
| From: | Andrei Zmievski | Date: | Tue, 27 Jun 2000 13:42:49 +0000 |
| Subject: | Re: Re: PHP 4.0 Bug #5226 Updated: arrayfields reorganized when using array_pop | ||
| References: | 1 2 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-22475@lists.php.net to get a copy of this message | ||
On Tue, 27 Jun 2000, Stanislav Malyshev wrote:
> 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?
Well, both shift and pop use internal splice function because it's
fairly generic.
> Anyway, I agree here that is should preserve keys and order. Though
> shift/unshift probably shouldn't.
How about splice()?
-Andrei
Nobody tried to design Windows - it just grew in random
directions without any kind of thought behind it.