add: Super Global Variables in Miscellaneous

This commit is contained in:
nplgdjp@gmx.com committed 2025-06-18 20:07:03 +02:00
1 parent 0b2802d34e
commit adfd364a5c
1 file changed
+20 -1
+20 -1
View File
@@ -985,7 +985,7 @@ $currentStatus = Status::Approved;
echo getStatusMessage($currentStatus); // Output : Your request has been approved.
```
## Date & Time Handling
## PHP Date & Time Handling
### Current date and time
```php
@@ -1162,6 +1162,25 @@ See: [Regex in PHP](/regex#regex-in-php)
| `a` | Write, append |
| `a+` | Read and write, append |
### Super Global Variables {.col-span-2}
| Variable | Description |
|--------------|:-------------------------------------------------------------|
| `$_SERVER` | Holds information about headers, paths, and script locations |
| `$_GET` | Contains data sent via URL parameters (query string) |
| `$_POST` | Contains data sent via HTTP POST method |
| `$_FILES` | Contains information about uploaded files |
| `$_COOKIE` | Contains cookie data |
| `$_SESSION` | Stores session variables |
| `$_REQUEST` | Contains data from `$_GET`, `$_POST`, and `$_COOKIE` |
| `$_ENV` | Contains environment variables |
| `$GLOBALS` | References all global variables available in the script |
{.left-text}
Super Global Variables are built-in variables always available in all scopes.
### Runtime defined Constants
```php