Gen. partnerAlgotech

PHP function getenv()

Gets the value of an environment variable

|
September 11, 2019

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

Loading comments...

Stay in the loop

Subscribe to our newsletter and get the latest cybersecurity news delivered straight to your inbox.

Your data is safe. You can unsubscribe from the newsletter at any time.