Skip to main content

SuperGlobals

...

📄️ What Are Superglobals?

Superglobals in PHP are a group of global variables that are accessible from anywhere within a PHP script, including functions and classes. These variables are associative arrays that store information about the current request, session, and server environment. Superglobals are one of the features of PHP that makes it so practical to work with, however, they can also be a source of security vulnerabilities if not used correctly. I think that is a big part of why some developers have an issue with PHP. It's not that they are inherently bad, but they can be misused.