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

1.2 KiB

title
Super Globals

Super Globals

This is a stub. Help our community expand it.

This quick style guide will help ensure your pull request gets accepted.

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: