public static function where(array $data, array $conditions = array())
    {
        foreach ($conditions as $condition) {
            if (!is_array($condition)) {
                trigger_error('Condition '.var_export($condition, true).' must be an array!', E_USER_ERROR);
            } else {
                array_map(function ($item, $key) use (&$data, $condition) {
                    $return = 0;
                    $operator = array_key_exists(2, $condition) ? $condition[1] : '===';
                    $search_value = array_key_exists(2, $condition) ? $condition[2] : $condition[1];
                    if (is_array($condition[0])) {
                        // array of keys
                        if (is_array($search_value)) {
                            // array of values
                            foreach ($condition[0] as $prop) {
                                $value = Arrch::extractValues($item, $prop);
                                foreach ($search_value as $query_val) {
                                    $return += Arrch::compare(array($value, $operator, $query_val)) ? 1 : 0;
                                }
                            }
                        } else {
                            // single value
                            foreach ($condition[0] as $prop) {
                                $value = Arrch::extractValues($item, $prop);
                                $return += Arrch::compare(array($value, $operator, $search_value)) ? 1 : 0;
                            }
                        }
                    } elseif (is_array($search_value)) {
                        // single key, array of query values
                        $value = Arrch::extractValues($item, $condition[0]);
                        $c = 0;
                        foreach ($search_value as $query_val) {
                            $c += Arrch::compare(array($value, $operator, $query_val)) ? 1 : 0;
                        }
                        // Negate options that don't pass all negative assertions
                        if (in_array($operator, array('!==', '!=', '!~')) && $c < count($search_value)) {
                            $c = 0;
                        }
                        $return += $c;
                    } else {
                        // single key, single value
                        $value = Arrch::extractValues($item, $condition[0]);
                        $return = Arrch::compare(array($value, $operator, $search_value));
                    }

                    // Unset
                    if (!$return) {
                        unset($data[$key]);
                    }
                }, $data, array_keys($data));
            }
        }
        return $data;
    }