As for the other "compare function" callbacks, the return value from the callback function doesn't need to be -1, 0, or 1.
cmp($a,$b) just needs to be <0, =0, or >0 depending on whether $a<$b, $a=$b, or $a>$b.
As for the other "compare function" callbacks, the return value from the callback function doesn't need to be -1, 0, or 1.
cmp($a,$b) just needs to be <0, =0, or >0 depending on whether $a<$b, $a=$b, or $a>$b.