The superglobals in PHP are:
- $GLOBALS
- $_SERVER
- $_GET
- $_POST
- $_FILES
- $_COOKIE
- $_SESSION
- $_REQUEST
- $_ENV
Don't be confused by the name of superglobals, their scopes vary from one to another:
- $GLOBALS
- $_SERVER
- $_GET
- $_POST
- $_FILES
- $_COOKIE
- $_SESSION
- $_ENV
The scope can be across scripts including functions and methods, but it must be within the same web page.
The scope is the same as $GLOBALS.
The scope is the same as $GLOBALS.
The scope is the same as $GLOBALS.
The scope is the same as $_POST.
The scope can be across pages, sessions, instances until expired, but it must be within the same browser.
The scope can be across pages, but it must be within the same session.
The scope can be across pages, sessions, and instances, but it must be within the same shell.