Superglobals

 

Superglobals

Superglobals are built-in variables that are always available in all scopes. There is no need to do global $variable; to access them within functions or methods.

 

The PHP superglobal variables are:

  • $GLOBALS
  • $_SERVER
  • $_REQUEST
  • $_POST
  • $_GET
  • $_FILES
  • $_ENV
  • $_COOKIE
  • $_SESSION