Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
String comparisons using a "natural order" algorithm
<?php strnatcmp(string $string1, string $string2): int
<?php                         $result = match ($options) {

                            SORT_NUMERIC => intval($values[0]) <=> intval($values[1]),

                            SORT_STRING => strcmp($values[0], $values[1]),

                            SORT_NATURAL => strnatcmp($values[0], $values[1]),

                            SORT_LOCALE_STRING => strcoll($values[0], $values[1]),

                            default => $values[0] <=> $values[1],

                        };