roundcubemail/program/lib/Roundcube/rcube_vcard.php
private static function array_filter($arr, $values, $inverse = false)
    {
        if (!is_array($values)) {
            $values = explode(',', $values);
        }

        $result = array();
        $keep   = array_flip((array)$values);

        foreach ($arr as $key => $val) {
            if ($inverse != isset($keep[strtolower($val)])) {
                $result[$key] = $val;
            }
        }

        return $result;
    }
private static function array_filter($arr, $values, $inverse = false)
    {
        if (!is_array($values)) {
            $values = explode(',', $values);
        }

        $result = array();
        $keep   = array_flip((array)$values);

        foreach ($arr as $key => $val) {
            if ($inverse != isset($keep[strtolower($val)])) {
                $result[$key] = $val;
            }
        }

        return $result;
    }
private static function array_filter ( $ arr , $ values , $ inverse = false ) { if ( ! is_array ( $ values ) ) { $ values = explode ( ',' , $ values ) ; } $ result = array ( ) ; $ keep = array_flip ( ( array ) $ values ) ; foreach ( $ arr as $ key => $ val ) { if ( $ inverse != isset ( $ keep [ strtolower ( $ val ) ] ) ) { $ result [ $ key ] = $ val ; } } return $ result ; }
Extract array values by a filter

@param array Array to filter
@param keys Array or comma separated list of values to keep
@param boolean Invert key selection: remove the listed values

@return array The filtered array
Extract array values by a filter