Req #74002 [Opn->Sus]: Add function for deleting item from array by value
| From: | cmb@php.net | Date: | Fri, 27 Jan 2017 18:40:23 +0000 |
| Subject: | Req #74002 [Opn->Sus]: Add function for deleting item from array by value | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-206982@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=74002&edit=1
ID: 74002
Updated by: cmb@php.net
Reported by: kevas777 at mail dot ru
-Summary: Please add new function with deleting item from
array
+Summary: Add function for deleting item from array by value
-Status: Open
+Status: Suspended
Type: Feature/Change Request
-Package: *General Issues
+Package: Arrays related
-Operating System: WIndows 7
+Operating System: *
PHP Version: 7.1.1
Block user comment: N
Private report: N
New Comment:
IMO, adding yet another array function (particularly one that can
easily implemented in userland) should require the RFC process[1],
so please do that. Meanwhile, I'm suspending this ticket.
[1] <https://wiki.php.net/rfc/howto>
Previous Comments:
------------------------------------------------------------------------
[2017-01-26 11:41:25] kevas777 at mail dot ru
Description:
------------
Please add new function with deleting item from array by value. i know that i can find key of item
and then unset it...or flit keys and values unset, and again i must to flip array. In any case i
must to right 3-4 lines of code only for deleting item from array. Please i want func that delete it
without this lines. For example array_delete_item(array &$arr, object $value)
Test script:
---------------
$arr = array_flip($arr);
unset($arr[$value]);
$arr=array_flip($arr);
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=74002&edit=1