public static function sortByCol(
        array &$array, $column, $sort = SORT_STRING, $direction = SORT_ASC
    )
    {
        if (!sizeof($array)) {
            return;
        }

        $index = [];
        $i = 0;
        foreach ($array as $key => $row) {
            if (is_array($row)) {
                $index['pos'][$i]  = $key;
                $index['name'][$i] = $row[$column];
                ++$i;
            }
        }
        array_multisort($index['name'], $sort, $direction, $index['pos']);
        $result = array();
        for ($j = 0; $j < $i; ++$j) {
            $result[$index['pos'][$j]] = $array[$index['pos'][$j]];
        }
        $array = $result;
    }