note 58854 added to function.array-unique
| From: | kazan at cs dot iastate dot edu | Date: | Thu, 17 Nov 2005 21:06:00 +0000 |
| Subject: | note 58854 added to function.array-unique | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-98725@lists.php.net to get a copy of this message | ||
absolutely never trust this functing in a production environment. It improperly removed
non-duplicate IDs from an array resulting in a billing undercharge on a production environment - the
exact opposite bug caused by in_array behaving badly that using this function was meant to solve.
Always use in_array with the strict option and everything properly cast - if you must use
array_unique implement your own with strict in_array and casting.
----
Manual Page -- http://www.php.net/manual/en/function.array-unique.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+58854
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+58854&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+58854&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+58854&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+58854&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+58854&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+58854&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+58854&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+58854&report=yes
Search -- http://master.php.net/manage/user-notes.php