go to bug id or search bugs for
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.
Add a Patch
Add a Pull Request
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. Anybody is welcome to start it! For the time being,
I'm suspending this ticket.