PHP function getenv()

Available in PHP 4.0, PHP 7.1

Gets the value of an environment variable

Parameters

Parameter Data type Default value Note
$varname string null The variable name.

Return values

string

|array|false the value of the environment variable varname or array with all environment variables if no variable name provided, or false on an error.

Additional resources

Official getenv documentation

Newsletter

Nejlepsi tipy a triky o PHP do Vaseho e-mailu. Clanky a novinky nejen ze sveta PHP a programovani.