leods92/php-router — comment on commit 340c98dfc69d1f29b8702ee1dad9bd41b47dcef1
File:  line 0
By robap:

How about just adding sortMoreSpecific as a private method in Router?

private function sortMoreSpecific($a, $b)
{
return (strlen($b) - strlen($a));
}

Then, remove lines 61-65 and change line 66 to

uksort($args, array($this, 'sortMoreSpecific'));