Skip to content

Environment

github-actions[bot] edited this page May 2, 2026 · 1 revision

Reads environment variables through PHP's native runtime.


Methods

get

Reads an environment variable or the current environment map.

public get(string|null $name = null, string|null $default = null): array<string,string>|string|null

Parameters:

Parameter Type Description
$name string|null the environment variable name, or null to read the current environment map
$default string|null the value returned when the named variable is not defined

Return Value:

the environment map, variable value, or default fallback


Clone this wiki locally