private static function myParse(string $scheme, ?string &$result = null, ?int &$type = null, ?int &$defaultPort = null, ?string &$error = null): bool
    {
        if ($scheme === '') {
            $error = 'Scheme "' . $scheme . '" is empty.';

            return false;
        }

        $result = strtolower($scheme);

        if (!isset(self::$mySchemes[$result])) {
            $error = 'Scheme "' . $scheme . '" is invalid: Scheme must be "http" or "https".';

            return false;
        }

        $schemeInfo = self::$mySchemes[$result];
        $type = $schemeInfo[0];
        $defaultPort = $schemeInfo[1];

        return true;
    }