public static function arrayRemoveDuplicates(&$s)
    {
        $found = [];
        $j = 0;
        foreach ($s as $i => $x) {
            if (!isset($found[$x])) {
                $found[$x] = true;
                $s[$j] = $s[$i];
                ++$j;
            }
        }
        $s = \array_slice($s, 0, $j);
    }
public static function arrayRemoveDuplicates(&$s)
    {
        $found = [];
        $j = 0;
        foreach ($s as $i => $x) {
            if (!isset($found[$x])) {
                $found[$x] = true;
                $s[$j] = $s[$i];
                ++$j;
            }
        }
        $s = \array_slice($s, 0, $j);
    }
public static function arrayRemoveDuplicates ( & $ s ) { $ found = [ ] ; $ j = 0 ; foreach ( $ s as $ i => $ x ) { if ( ! isset ( $ found [ $ x ] ) ) { $ found [ $ x ] = true ; $ s [ $ j ] = $ s [ $ i ] ; ++ $ j ; } } $ s = \ array_slice ( $ s , 0 , $ j ) ; }
removes any duplicated elements in a string array.

@param array $s
removes any duplicated elements in a string array .