The deprecation message for the usort() function regarding returning a boolean from the comparison function is "Returning bool values from comparison functions is deprecated. Return an integer less than, equal to, or greater than zero". Instead of returning a boolean, the comparison function should return an integer, either less than, equal to, or greater than zero, indicating the order of the two elements being compared.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2023-05-18 00:40:46 +0000
Seen: 7 times
Last updated: May 18 '23