Re: Re: PHP 4.0 Bug #5226 Updated: arrayfields reorganized when using array_pop
| From: | Andrei Zmievski | Date: | Tue, 27 Jun 2000 14:10:06 +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-22484@lists.php.net to get a copy of this message | ||
On Tue, 27 Jun 2000, Stanislav Malyshev wrote:
> We have another trouble here.
>
> <?
> $a["abc"] = 1;
> $a["4"] = 2;
> $a["def"] = 3;
> array_pop($a);
> var_dump($a);
> ?>
>
> gives:
>
> array(2) {
> ["abc"]=>
> int(1)
> [0]=>
> int(2)
> }
>
> It killed my "4" and made it be 0. Grrr...
That's because Zend interprets "4" as numeric key 4, which obviously
relates to what we've been discussing here.
-Andrei
Linux is like living in a teepee.
No Windows, no Gates, Apache in house.
- Usenet signature