public static function fromGlobals(array $server = null, array $query = null, array $body = null, array $cookies = null, array $files = null) : ServerRequestInterface
	{
		$server  = $server  ?? $_SERVER ?? [];
		$query   = $query   ?? $_GET    ?? [];
		$body    = $body    ?? $_POST   ?? [];
		$cookies = $cookies ?? $_COOKIE ?? [];
		$files   = $files   ?? $_FILES  ?? [];

		$request = (new ServerRequest)
		->withProtocolVersion(request_http_version($server))
		->withBody(request_body())
		->withMethod(request_method($server))
		->withUri(request_uri($server))
		->withServerParams($server)
		->withCookieParams($cookies)
		->withQueryParams($query)
		->withUploadedFiles(request_files($files))
		->withParsedBody($body);

		foreach (request_headers($server) as $name => $value)
		{
			$request = $request->withHeader($name, $value);
		}

		return $request;
	}