protected function rebase(array $a)
    {
        $res = [];
        ksort($a);
        foreach(array_values($a) as $row) {
            ksort($row);
            $res[] = array_values($row);
        }

        return $res;
    }
protected function rebase(array $a)
    {
        $res = [];
        ksort($a);
        foreach(array_values($a) as $row) {
            ksort($row);
            $res[] = array_values($row);
        }

        return $res;
    }
protected function rebase ( array $ a ) { $ res = [ ] ; ksort ( $ a ) ; foreach ( array_values ( $ a ) as $ row ) { ksort ( $ row ) ; $ res [ ] = array_values ( $ row ) ; } return $ res ; }
Sort and rebase the result array to zero

@param array $a
@return array
Sort and rebase the result array to zero