How the strength of a collation influences the order of elements used by intl-sort.

Code
<?php

use Budgegeria\IntlSort\Builder;

$array = ['àb''aB''a''ab''a-b'];

// Primary Strength
// Ignore accents and case
$sortBuilder = new Builder('en_US');
$sorter $sortBuilder->primaryStrength()
    ->
getSorter();

dump($sorter->sort($array));

// Secondary Strength
// Ignore case, consider accents
$sortBuilder = new Builder('en_US');
$sorter $sortBuilder->secondaryStrength()
    ->
getSorter();

dump($sorter->sort($array));

// Tertiary Strength
// Consider accents and case
$sortBuilder = new Builder('en_US');
$sorter $sortBuilder->tertiaryStrength()
    ->
getSorter();

dump($sorter->sort($array));

// Tertiary Strength
// but a-b is considered similar to ab
$sortBuilder = new Builder('en_US');
$sorter $sortBuilder->tertiaryStrength()
    ->
shiftedAlternateHandling()
    ->
getSorter();

dump($sorter->sort($array));
Result
^ array:5 [
2 => "a"
4 => "a-b"
0 => "àb"
1 => "aB"
3 => "ab"
]

^ array:5 [
2 => "a"
4 => "a-b"
1 => "aB"
3 => "ab"
0 => "àb"
]

^ array:5 [
2 => "a"
4 => "a-b"
3 => "ab"
1 => "aB"
0 => "àb"
]

^ array:5 [
2 => "a"
3 => "ab"
4 => "a-b"
1 => "aB"
0 => "àb"
]
Used Versions
PHP 8.2, Laminas MVC 3.2, Symfony 5.2, Laravel 8.28, PHPUnit 9.5, Doctrine ORM 2.8