RE: [PHP-DEV] Re: PHP 4.0 Bug #5226 Updated: arrayfields reorganized when using array_pop
| From: | Theodore | Date: | Tue, 27 Jun 2000 01:05:08 +0000 |
| Subject: | RE: [PHP-DEV] 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-22417@lists.php.net to get a copy of this message | ||
and leave that one spot empty? no, read the manual, it takes it out, just
like if you pile up checkers, then take the one from the bottom, the rest
don't sit in mid air, they fall down to take the place of the removed one.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Theodore Baschak - Gecko Internet Services
http://www.gecko-internet.com
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-----Original Message-----
From: frank bretschneider [mailto:bretschneider@freestyling.de]
Sent: June 26, 2000 2:13 PM
To: Bug Database
Subject: [PHP-DEV] Re: PHP 4.0 Bug #5226 Updated: arrayfields
reorganized when using array_pop
but what i do not unterstand why
array_pop rearanges the arraykies.
before the array_pop-funct is called the first array-key was 1.
after i "called" array_pop the first array_key is 0 ...
i think that is not array_pop should do. what array_pop should do, is
pop the last element of the array and leave "the rest of the array" as it
is.
thank you
frank bretschneider
Bug Database wrote:
> ID: 5226
> Updated by: stas
> Reported By: bretschneider@freestyling.de
> Status: Closed
> Bug Type: Scripting Engine problem
> Assigned To:
> Comments:
>
> AFAIU that's exactly what pop should do - pop element from array.
>
> Why should it insert empty element on top?
>
> Full Bug description available at:
> http://bugs.php.net/version4/?id=5226
--
---------------------------------------------------------
freestyle web services - frank bretschneider - CTO
rhodiusstr. 4 - 51065 cologne - germany
tel.: +49 (0)221 611924 - Fax: +49 (0)221 222 9549
mailto:bretschneider@freestyling.de - http://freestyling.de