What are superglobal/global variables ?

Last updated 5 years, 1 month ago | 1272 views 75     5

Tags:- PHP

PHP | What are superglobal/global variables?

Superglobal is out of scope limitation. These variables can be accessed from any function, class, or 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:

  • $_SERVER
  • $_GET
  • $_POST
  • $_COOKIE
  • $_FILES
  • $_ENV