src/Utilities/Uri.php
public static function getProtocolName()
    {
        $matches = [];
        $protocolData = Miscellaneous::getSafelyGlobalVariable(INPUT_SERVER, 'SERVER_PROTOCOL'); // e.g. HTTP/1.1
        $matchCount = preg_match('|(.+)\/(.+)|', $protocolData, $matches);

        /*
         * $matches[1] - protocol name, e.g. HTTP
         * $matches[2] - protocol version, e.g. 1.1
         */

        // Oops, cannot match protocol
        if (0 === $matchCount) {
            return '';
        }

        return strtolower($matches[1]);
    }
public static function getProtocolName()
    {
        $matches = [];
        $protocolData = Miscellaneous::getSafelyGlobalVariable(INPUT_SERVER, 'SERVER_PROTOCOL'); // e.g. HTTP/1.1
        $matchCount = preg_match('|(.+)\/(.+)|', $protocolData, $matches);

        /*
         * $matches[1] - protocol name, e.g. HTTP
         * $matches[2] - protocol version, e.g. 1.1
         */

        // Oops, cannot match protocol
        if (0 === $matchCount) {
            return '';
        }

        return strtolower($matches[1]);
    }
public static function getProtocolName ( ) { $ matches = [ ] ; $ protocolData = Miscellaneous :: getSafelyGlobalVariable ( INPUT_SERVER , 'SERVER_PROTOCOL' ) ; // e.g. HTTP/1.1 $ matchCount = preg_match ( '|(.+)\/(.+)|' , $ protocolData , $ matches ) ; /*
         * $matches[1] - protocol name, e.g. HTTP
         * $matches[2] - protocol version, e.g. 1.1
         */ // Oops, cannot match protocol if ( 0 === $ matchCount ) { return '' ; } return strtolower ( $ matches [ 1 ] ) ; }
Returns protocol name

@return string
Returns protocol name