What are superglobal/global variables ?

Last updated 1 year, 9 months ago | 234 views 75     5

Superglobal variables 

Superglobal are out of scope limitation. These variables can be accessed from any function, class or any file without doing anything special such as declaring any global variable etc. These variables store information in an array. Commonly they are used to store and get information from one page to another in an application.

Below is the list of superglobal variables available in PHP:

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