getenv()
function getenv(?string $name = null, bool $local_only = false): string|array|false
Gets the value of an environment variable, or the whole environment.
Parameters:
$name(?string), defaultnull, optional$local_only(bool), defaultfalse, optional
Returns: string|array|false
Availability
| Compiled (AOT) | Magician (eval) |
|---|---|
| Available | Available |
No examples yet. Check examples/ and showcases/ for usage patterns.
Internals
For how getenv is implemented in the compiler, see the internals page.