在 PHP 7 中添加和删除的服务器变量很少吗?

Are few of the server variables been added and few have been removed in PHP 7?

我正在学习 PHP w3schools 的 PHP 教程。我正在使用 PHP 7.0.13

在学习过程中我遇到了全局变量的概念 - Superglobals

This is the page from where I'm learning Global Variables - Superglobals

注意:请到上面link查看服务器变量列表。

在此页面上,我尝试了所有服务器变量,但我收到 Notice 作为 Undefined index 以下几个服务器变量:

  1. $_SERVER['HTTP_ACCEPT_CHARSET']
  2. $_SERVER['HTTPS']
  3. $_SERVER['REMOTE_HOST']
  4. $_SERVER['SCRIPT_URI']

对于上述每个变量,我都尝试了以下代码。例如:

<!DOCTYPE html>
<html>
  <body>
    <pre>
    <?php
      echo $_SERVER['PATH_TRANSLATED'];//like this I tried for other three server variables also
    ?>
    </pre>
  </body>
</html>

除此之外,当我尝试执行代码 print_r($_SERVER);

时,我还观察到数组 $_SERVRER 中几乎没有新的服务器变量

所以,我的问题是 PHP5 中存在的旧服务器变量中有几个已在 PHP7 中删除,并且新添加了几个?

我也尝试查看 PHP 文档,但我对此一无所知。

所以,请有人解开我的疑惑。

谢谢。

$_SERVER的内容主要由网络服务器创建,如documented here:

$_SERVER is an array containing information such as headers, paths, and script locations. The entries in this array are created by the web server. There is no guarantee that every web server will provide any of these; servers may omit some, or provide others not listed here. That said, a large number of these variables are accounted for in the » CGI/1.1 specification, so you should be able to expect those.

所以 PHP 在这里做的事情很少。