Introduction
In addition to user defined variables, PHP populates the global namespace with a number of predefined variables called superglobals. They are always available to be accessed from within any function or method, without specifying the global keyword. List of supperglobals is given below −
| $GLOBALS | References all variables available in global scope |
| $_?SERVER | Server and execution environment information |
| $_?GET | HTTP GET variables |
| $_?POST | HTTP POST variables |
| $_?FILES | HTTP File Upload variables |
| $_?REQUEST | HTTP Request variables |
| $_?SESSION | Session variables |
| $_?ENV | Environment variables |
| $_?COOKIE | HTTP Cookies |
| $php_?errormsg | The previous error message |
| $HTTP_?RAW_?POST_?DATA | Raw POST data |
| $http_?response_?header | HTTP response headers |
| $argc | The number of arguments passed to script |
| $argv | Array of arguments passed to script |