mirror of
https://github.com/Fechin/reference.git
synced 2026-11-20 21:23:11 +03:00
add: Super Global Variables in Miscellaneous
This commit is contained in:
1 parent
0b2802d34e
commit
adfd364a5c
1 file changed
+20
-1
+20
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user