note 51850 deleted from function.usort by googleguy

From: Date: Tue, 22 Oct 2013 10:17:50 +0000
Subject: note 51850 deleted from function.usort by googleguy
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-196985@lists.php.net to get a copy of this message
Note Submitter: steve at tracorp dot com ---- When sorting a large multi-dimensional array, I ran into an issue where the array was not being sorted either ascending or descending, even when it started in sorted order. It turns out that the above note about the callback function returning an integer is true. My comparison function was just a subtraction between two floating point numbers, and the result being a float produced very unpredictable results.

« previous php.notes (#196985) next »