What are superglobal/global variables ?

50 Views

What are superglobal/global variables ?

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
Tags:-
PHP