@anotherusername said in [php] Guess the output...:

edit: the documentation for sort() says that most of them use QuickSort, so the result would depend on which element it chose to be the pivot.

So there's a chance that not only is sort not stable w.r.t. elements that compare equal, sorting a list twice might actually interchange elements that are not equal?