·  PHP – Syntax – Variables – Scope – Superglobal – $_ENV

 

- Info:

  - $_ ENV superglobal 2D array contains information regarding PHP parser’s underlying server environment.

 

- Example:

  - Create PHP Console Application Test.php.

 

    Test.html

    <?php

   

      //SOME VARIABLES FROM _GET.

      echo $_ENV['HOSTNAME']; //The server hostname.

      echo $_ENV['SHELL'   ]; //The system shell.

        

      //LIST ALL VARIABLES FROM SUPERGLOBAL ARRAY _GET.

      foreach ($_ENV as $var => $value) {

        echo "$var => $value \n";

      }

        

    ?>