Files
freeCodeCamp/guide/english/php/super-globals/index.md

766 B

title
title
Super Globals

Super Globals

List of Super Globals and what are they

Super globals are variables defined in the core of PHP, and they are available in all scopes throughout the script. This means that you do not need to define them as global $variable .

These superglobal variables are:

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

They all have their use cases, but mostly to beginners $GET and $POST are the most used. $_GET Pulls data from the url, while $_POST pulls data from the post request. Both of these are arrays. $_REQUEST_ is a collection of GET and POST.

More Information: