note 102700 added to function.usort
| From: | cuong dot huy dot to at gmail dot com | Date: | Tue, 01 Mar 2011 12:41:54 +0000 |
| Subject: | note 102700 added to function.usort | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-177434@lists.php.net to get a copy of this message | ||
Probably a bug or undocumented feature: usort() sort your list even if you don't want to.
Detail: If you call usort($your_list, "your_call_back_function"), where inside the
your_call_back_function() you return 0 immediately, then you would expect $your_list to be
unchanged. But in fact it is changed.
----
Server IP: 69.147.83.197
Probable Submitter: 80.113.160.213
----
Manual Page -- http://www.php.net/manual/en/function.usort.php
Edit -- https://master.php.net/note/edit/102700
Del: integrated -- https://master.php.net/note/delete/102700/integrated
Del: useless -- https://master.php.net/note/delete/102700/useless
Del: bad code -- https://master.php.net/note/delete/102700/bad+code
Del: spam -- https://master.php.net/note/delete/102700/spam
Del: non-english -- https://master.php.net/note/delete/102700/non-english
Del: in docs -- https://master.php.net/note/delete/102700/in+docs
Del: other reasons-- https://master.php.net/note/delete/102700
Reject -- https://master.php.net/note/reject/102700
Search -- https://master.php.net/manage/user-notes.php