rfc:list_assoc_unique
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
rfc:list_assoc_unique [2022/12/01 17:53] – ilutov | rfc:list_assoc_unique [2022/12/01 18:19] (current) – Move to under discussion ilutov | ||
---|---|---|---|
Line 2: | Line 2: | ||
* Date: 2022-12-01 | * Date: 2022-12-01 | ||
* Author: Ilija Tovilo < | * Author: Ilija Tovilo < | ||
- | * Status: | + | * Status: |
* Proposed Version: PHP 8.3 | * Proposed Version: PHP 8.3 | ||
* Implementation: | * Implementation: | ||
Line 15: | Line 15: | ||
using strict equality (< | using strict equality (< | ||
- | <php> | + | <code php> |
List\unique([1, | List\unique([1, | ||
// > [1, 2, 3, ' | // > [1, 2, 3, ' | ||
Line 21: | Line 21: | ||
Assoc\unique([' | Assoc\unique([' | ||
// > [' | // > [' | ||
- | </php> | + | </code> |
===== Proposal ===== | ===== Proposal ===== | ||
Line 41: | Line 41: | ||
Removing duplicates from arrays is a common use case provided by many programming languages. PHPs < | Removing duplicates from arrays is a common use case provided by many programming languages. PHPs < | ||
has been there for [[https:// | has been there for [[https:// | ||
- | However, PHP has multiple definitions of equality, four in particular supported by < | + | However, PHP has multiple definitions of equality, four in particular supported by < |
* < | * < | ||
Line 77: | Line 77: | ||
===== Alternative approaches ===== | ===== Alternative approaches ===== | ||
- | Previously, adding a new parameter | + | Previously, adding a new < |
- | people would prefer a new function over fixing the existing function | + | parameter |
- | to discover. | + | with a flag that might be more difficult to discover. |
===== Vote ===== | ===== Vote ===== |
rfc/list_assoc_unique.1669917182.txt.gz · Last modified: 2022/12/01 17:53 by ilutov