Introduction

Put simply, these are variables that are available in all scope in your scripts.

This means that there is no need to pass them as parameters in your functions, or store them outside a block of code to have them available in different scopes.

What’s a superglobal??

If you’re thinking that these are like superheroes - they’re not.

As of PHP version 7.1.3 there are 9 superglobal variables. They are as follows:

See the documentation.

Tell me more, tell me more

I’m sorry for the Grease reference! Link

Time for some explanation on these superheroesglobals.

$GLOBALS