Req #31375 [Opn->Sus]: array_set_current
| From: | cmb@php.net | Date: | Fri, 18 Sep 2020 12:10:49 +0000 |
| Subject: | Req #31375 [Opn->Sus]: array_set_current | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-229070@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=31375&edit=1
ID: 31375
Updated by: cmb@php.net
Reported by: ceo at l-i-e dot com
Summary: array_set_current
-Status: Open
+Status: Suspended
Type: Feature/Change Request
Package: Arrays related
Operating System: Irrelevant
PHP Version: *
Block user comment: N
Private report: N
New Comment:
As the discussion on the related pull request ticket[1] shows,
this feature appears to be somewhat controversial. As such it
needs to be further discussed, which is beyond the scope of this
bug tracker. So whoever is interested in having this, should
write mail to the PHP internals mailing list[2]. For the time
being, I'm suspending this ticket.
[1] <https://github.com/php/php-src/pull/645>
[2] <https://www.php.net/mailing-lists.php#internals>
Previous Comments:
------------------------------------------------------------------------
[2014-03-06 13:32:15] narf at devilix dot net
+1
------------------------------------------------------------------------
[2011-08-23 16:14:24] datibbaw@php.net
The following patch has been added/updated:
Patch Name: reset_end_with_offset.patch.txt
Revision: 1314116064
URL: https://bugs.php.net/patch-display.php?bug=31375&patch=reset_end_with_offset.patch.txt&revision=1314116064
------------------------------------------------------------------------
[2005-01-01 21:16:05] ceo at l-i-e dot com
Description:
------------
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.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=31375&edit=1