Re: [PHP-DEV] array_shift() and reindexing

2012-07-12 Thread Jille Timmermans
Op 12-07-12 15:18, Johannes Schlüter schreef: On Thu, 2012-07-12 at 13:43 +0200, Jille Timmermans wrote: Hello, array_shift() currently reindexes the array after shifting one element. The reindexing has quite some impact on it's performance. I would like to suggest an extra parameter to array_s

Re: [PHP-DEV] array_shift() and reindexing

2012-07-12 Thread Johannes Schlüter
On Thu, 2012-07-12 at 13:43 +0200, Jille Timmermans wrote: > Hello, > > array_shift() currently reindexes the array after shifting one element. > The reindexing has quite some impact on it's performance. I would like > to suggest an extra parameter to array_shift() which can be used to > preven

Re: [PHP-DEV] array_shift() and reindexing

2012-07-12 Thread Jille Timmermans
It seems 7-8 times slower than array_shift() and that is even without a way to fetch the first value. I tried `$array = array_slice($array, 1)` and `$array = array_slice($array, 1, NULL, true);` -- Jille Op 12-07-12 14:39, David Muir schreef: What about replacing the existing array with a

Re: [PHP-DEV] array_shift() and reindexing

2012-07-12 Thread David Muir
What about replacing the existing array with array_slice? David On 12/07/2012, at 9:43 PM, Jille Timmermans wrote: > Hello, > > array_shift() currently reindexes the array after shifting one element. The > reindexing has quite some impact on it's performance. I would like to suggest > an ext