What is usort() function in php & how to use it ?

The usort() function sort an array by values using a user-defined comparison function. It accepts two parameters, the first parameter must be an array to sort and the second parameter must be a string that defines a function. The function must return an integer less than, equal to, or greater than zero if the first argument is considered to be respectively less than, equal to, or greater than the second. Note that before PHP 7.0.0 this integer had to be in the range from -2147483648 to 2147483647.

Continue reading What is usort() function in php & how to use it ?