protected function assertProtocolVersion($version)
    {
        if (!is_string($version) && !is_numeric($version)) {
            throw new \InvalidArgumentException("HTTP version must be a string or float");
        }
        
        if ($version != '' && $version !== "1.0" && $version !== "1.1" && $version !== "2") {
            throw new \InvalidArgumentException("Invalid HTTP protocol version '$version'");
        }
    }
protected function assertProtocolVersion($version)
    {
        if (!is_string($version) && !is_numeric($version)) {
            throw new \InvalidArgumentException("HTTP version must be a string or float");
        }
        
        if ($version != '' && $version !== "1.0" && $version !== "1.1" && $version !== "2") {
            throw new \InvalidArgumentException("Invalid HTTP protocol version '$version'");
        }
    }
protected function assertProtocolVersion ( $ version ) { if ( ! is_string ( $ version ) && ! is_numeric ( $ version ) ) { throw new \ InvalidArgumentException ( "HTTP version must be a string or float" ) ; } if ( $ version != '' && $ version !== "1.0" && $ version !== "1.1" && $ version !== "2" ) { throw new \ InvalidArgumentException ( "Invalid HTTP protocol version '$version'" ) ; } }
Set the HTTP protocol version.

@param string $version HTTP protocol version
@throws \InvalidArgumentException for invalid versions
Set the HTTP protocol version .