Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions reference/array/functions/array-unique.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,17 @@
Comparison type flags:
<itemizedlist>
<listitem>
<simpara><constant>SORT_REGULAR</constant> - compare items normally
(don't change types)</simpara>
<para>
<constant>SORT_REGULAR</constant> - compare items normally
(don't change types)
<note>
<simpara>
Be careful when using this flag in combination with numeric strings
as array values since this causes them to not be filtered out

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe you can be more precise. "Can result in duplicate values"

Copy link
Contributor Author

@shaedrich shaedrich Oct 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I wasn't sure how to word it to not make the text too long 😅

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using this flag can result in duplicate values like: [5, 10, '3A', 5]

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, okay—I'd leave that to the maintainers

correctly and you end up with duplicated values.
</simpara>
</note>
</para>
</listitem>
<listitem>
<simpara><constant>SORT_NUMERIC</constant> - compare items numerically</simpara>
Expand Down