Re: array_seek function

From: Date: Tue, 16 Mar 2010 16:15:55 +0000
Subject: Re: array_seek function
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-47317@lists.php.net to get a copy of this message
On 16-mrt-2010, at 17:07, Derick Rethans wrote: > On Tue, 16 Mar 2010, Felix De Vliegher wrote: > >> Right now, it returns the value of a given position. In that case, >> array_get_pos might be a better name. Oh, and I attached the patch >> with .txt extension :) > > Does it also seek the array pointer? Because I think array_seek that > moves the pointer, in combination with current() and key() might make > slightly more sense? > Mikko updated the patch a bit to set the array pointer correctly (and make it perform a bit better when dealing with large arrays), my version left it one position too far. So yes, that's possible. The updated version can be found here: http://valokuva.org/~mikko/array_seek.patch.txt Cheers, Felix

« previous php.internals (#47317) next »