php - usort changing Array's order -
I have a user function with a line: return 0. I tried to use it on an array of stdClass objects, and it changes their order, how is this possible?
The property that you believe is named: A Stable sorting algorithm elements Will not change the sequence, which are similar. The php sorting functions no are static (since the non-static type may be slightly faster). From: If two members compare as equal, their order in the ordered array is undefined. If you want a stable sorting algorithm, then you
Comments
Post a Comment