getProtocolVersion(); echo "The protocol version used in this request is " . $protocolVersion; ?>
getProtocolVersion(); if ($version == "HTTP/1.1") { echo "This request uses HTTP/1.1"; } else { echo "This request uses a different version of the HTTP protocol"; } ?>This example uses the Symfony HTTP Foundation library to create a Request object from the global variables. It then checks the protocol version of the request and prints a message based on the version number.