array_pop() and pointer

From: Date: Thu, 09 Jan 2003 10:05:56 +0000
Subject: array_pop() and pointer
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969350781@lists.php.net to get a copy of this message
Hello. I've just updated to 4.3.0 (from 4.0.4pl1) and recognized that the function array_pop() now move the pointer of the array. So if one use a "while - each" after a array_pop call one should first rewind the pointer with the reset() function. I think, this should be mentioned within the documentation. BTW: The use of array_pop within a while - each loop may cause problems, but I haven't tested this. The same problems may affect to the array_push, array_shift and array_unshift functions but I didn't tested this, too. Bye, Rene René Fertig Abt. Netzbetrieb/Systemkonfiguration telebel Gesellschaft fuer Telekommunikation Bergisches Land Tel: +49 202 27167-223 Johannisberg 7 Fax: +49 202 27167-283 D-42103 Wuppertal Mobil: +49 172 2035310 Germany eMail: rfertig@telebel.net http://www.telebel.de

« previous php.doc (#969350781) next »