public static function input($key = '', bool $xss = true, bool $cookie = false, array $options = []) {
		// cookie first, get and post after
		$_GET = $_GET ?? $_REQUEST ?? [];
		// fix files
		$files = [];
		foreach (($_FILES ?? []) as $k => $v) {
			// we need to convert
			if (is_array($v['name'])) {
				foreach ($v['name'] as $k2 => $v2) {
					if (empty($v['tmp_name'][$k2])) continue;
					$files[$k][$k2] = [
						'name' => $v2,
						'type' => $v['type'][$k2],
						'tmp_name' => $v['tmp_name'][$k2],
						'error' => $v['error'][$k2],
						'size' => $v['size'][$k2],
					];
				}
			} else {
				if (empty($v['tmp_name'])) continue;
				$files[$k] = $v;
			}
		}
		if ($cookie) {
			$result = array_merge($_COOKIE, $_GET, $_POST, $files);
		} else {
			$result = array_merge($_GET, $_POST, $files);
		}
		// protection against XSS attacks is on by default
		if ($xss) $result = strip_tags2($result, $options);
		// we need to get rid of session id from the result
		if (!$cookie) {
			unset($result[session_name()]);
		}
		// if we are debugging
		if (Debug::$debug) {
			Debug::$data['input'][] = $result;
		}
		// returning result
		if ($key) {
			return array_key_get($result, $key);
		} else {
			return $result;
		}
	}