On Tue, 16 Mar 2010, Felix De Vliegher wrote: > 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
I was also thinking, can we just make this work just like fseek (with a "whence" parameter) as well? (http://uk3.php.net/fseek) with kind regards, Derick -- http://derickrethans.nl | http://xdebug.org Like Xdebug? Consider a donation: http://xdebug.org/donate.php twitter: @derickr and @xdebug -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php