public static function arraySortMulti(array &$aArray, $sField)
    {
        uasort($aArray, function ($a, $b) use ($sField) {

            $oA = (object) $a;
            $oB = (object) $b;

            $mA = property_exists($oA, $sField) ? strtolower($oA->$sField) : null;
            $mB = property_exists($oB, $sField) ? strtolower($oB->$sField) : null;

            //  Equal?
            if ($mA == $mB) {
                return 0;
            }

            //  If $mA is a prefix of $mB then $mA comes first
            if (preg_match('/^' . preg_quote($mA, '/') . '/', $mB)) {
                return -1;
            }

            //  Not equal, work out which takes precedence
            $aSort = [$mA, $mB];
            sort($aSort);

            return $aSort[0] == $mA ? -1 : 1;
        });
    }