Req #65098 [Opn->Sus]: A modified version of array_combine()

From: Date: Mon, 12 Mar 2018 15:16:08 +0000
Subject: Req #65098 [Opn->Sus]: A modified version of array_combine()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-214301@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=65098&edit=1 ID: 65098 Updated by: cmb@php.net Reported by: porton at narod dot ru Summary: A modified version of array_combine() -Status: Open +Status: Suspended Type: Feature/Change Request Package: Arrays related PHP Version: 5.5.0 Block user comment: N Private report: N New Comment: That appears to be controversial (at least I don't see a good reason to add array_combine_array()), so it would require the RFC process[1]. Anybody is welcome to start it! For the time being, I'm suspending this ticket. [1] <https://wiki.php.net/rfc/howto> Previous Comments: ------------------------------------------------------------------------ [2013-06-22 17:54:50] porton at narod dot ru Description: ------------ array_combine() does not behave well in the case if a key is met more than once. I propose to add new function array_combine_array(array $keys, array $values) which will create a map from keys to arrays, each of these arrays being the list of values corresponding to this key. (If a key is met once, the array associated with this key could be on-element.) The order of the array corresponding to a key should be agreed with the order of the original array "$values". This can be easily implemented in PHP, but it's better to have array_combine_array() in the standard PHP library. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=65098&edit=1

« previous php.bugs (#214301) next »