Superglobals variables in php are the built-in array. They are available in every scope. You can access the superglobal variable inside and outside the methods.
PHP Superglobals variables:
$_COOKIE
contains values provided to the script via HTTP cookies.
$_GET
contains variables submitted to the script using HTTP get method.
$_POST
contains variables submitted to the script using HTTP post method.
$_REQUEST
combined array containing values from the $_GET, $_POST, and $_COOKIES superglobal arrays.
$_ENV
contains keys and values set by the scripts shell.
$_FILES
contains information about uploaded files.
$_SERVER
contains variables made available by the server.
$GLOBALS
contains all the global variables associated with the current script.
0 Comment(s)