rfc:array_change_keys
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
rfc:array_change_keys [2016/05/31 01:32] – Update pros & cons colinodell | rfc:array_change_keys [2018/11/27 23:34] (current) – Withdrawing the RFC colinodell | ||
---|---|---|---|
Line 3: | Line 3: | ||
* Date: 2016-05-29 | * Date: 2016-05-29 | ||
* Authors: Colin O'Dell < | * Authors: Colin O'Dell < | ||
- | * Status: | + | * Status: |
* First Published at: http:// | * First Published at: http:// | ||
Line 113: | Line 113: | ||
==== Function Name ==== | ==== Function Name ==== | ||
- | PHP already has an '' | + | PHP already has an '' |
- | Other function | + | Other functions |
===== Discussion ===== | ===== Discussion ===== | ||
Line 134: | Line 134: | ||
Using this function makes it immediately obvious to other developers that an array is being re-keyed. | Using this function makes it immediately obvious to other developers that an array is being re-keyed. | ||
+ | |||
+ | === Matches Existing Behavior === | ||
+ | |||
+ | The "edge cases" mentioned above (returning invalid types or duplicate keys) matches existing behavior in PHP that developers already understand and expect. | ||
=== Faster Execution Than array_combine() === | === Faster Execution Than array_combine() === | ||
Line 184: | Line 188: | ||
===== Future Scope ===== | ===== Future Scope ===== | ||
- | Returning | + | Other '' |
- | ===== Proposed | + | ===== Voting ===== |
Because this is not a language change, a 50%+1 vote will be required to add this new function. | Because this is not a language change, a 50%+1 vote will be required to add this new function. | ||
Line 196: | Line 200: | ||
===== References ===== | ===== References ===== | ||
Links to external references, discussions or RFCs | Links to external references, discussions or RFCs | ||
+ | |||
+ | Mailing list discussion: [[https:// | ||
+ | |||
+ | Reddit discussion: [[https:// |
rfc/array_change_keys.1464658366.txt.gz · Last modified: 2017/09/22 13:28 (external edit)