|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #31375 array_set_current
Submitted: 2005-01-01 21:16 UTC Modified: 2017-10-24 07:12 UTC
Avg. Score:3.6 ± 0.8
Reproduced:4 of 4 (100.0%)
Same Version:1 (25.0%)
Same OS:0 (0.0%)
From: ceo at l-i-e dot com Assigned:
Status: Open Package: Arrays related
PHP Version: * OS: Irrelevant
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2005-01-01 21:16 UTC] ceo at l-i-e dot com
While messing around with next/current/end/prev on large arrays, it became apparent that there is a gaping hole in functionality:

I can't set the current internal pointer of the array to an arbitrary value. :-(

I have to walk through the whole array to the element I want as my 'current'

An array_set_current function which takes an array and integer to set the current internal pointer to the N'th element is pretty important for quickly starting off at the right place in my array.


reset_end_with_offset.patch.txt (last revision 2011-08-23 16:14 UTC by

Add a Patch

Pull Requests

Pull requests:

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-08-23 16:14 UTC]
The following patch has been added/updated:

Patch Name: reset_end_with_offset.patch.txt
Revision:   1314116064
 [2014-03-06 13:32 UTC] narf at devilix dot net
 [2014-04-17 14:39 UTC]
-Package: Feature/Change Request +Package: Arrays related -Operating System: All +Operating System: Irrelevant -PHP Version: Irrelevant +PHP Version: * -Assigned To: +Assigned To: datibbaw
 [2017-10-24 07:12 UTC]
-Status: Assigned +Status: Open -Assigned To: datibbaw +Assigned To:
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Tue Jul 07 10:01:25 2020 UTC