If I'm reading things correctly, strnatcmp and strnatcasecmp have "undefined" behaviour for sorting things that are equal. Is there any way to do the same sort of sorting, but ... preserve the existing order of equal items?
Er, I think I actually mean when used in conjunction with uasort().
Looks like this could help: https://packagist.org/packages/vanderlee/php-stable-sort-functions
Open source. Open community. We are dedicated to building and enriching the PHP community.