Re: Re: PHP 4.0 Bug #5226 Updated: arrayfields reorganized when using array_pop

From: Date: Mon, 26 Jun 2000 21:41:04 +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-22411@lists.php.net to get a copy of this message
Have a (closer) look at your code again and then you´ll see that you´re wrong... Hint: Try out var_dump() to get a *real* representation of that array. regards frank bretschneider wrote:
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 frank bretschneider <bretschneider@freestyling.de> freestyle web services frank bretschneider freestyle web services <bretschneider@freestyling.de> HTML Mail cologne 51065 Cellular: +49 (0)172 207 1994 Work: +49 (0)221 - 611924 Additional Information: Last Name bretschneider First Name frank Version 2.1 attachment.txt Content-Type: text/plain
-- o----------0-¬---------O-·---¬----o---®-----o o O ° . | http://www.kiffen.de | pRoteçt y0ur bRaín |0 O ° ¤ ° · 0°·³°²'²³-¹'³´³°^°³~³²³°'³²²¨³²^³¹³²°²³`³º³°Þ ° o © ° . · | psychedelic experience | gott@kiffen.de | O ° o ° o-¬--o--0-----©-·--O-----o-----0-¤----------o 0 ° · ° . ¤ ·

« previous php.dev (#22411) next »