src/Util/Env.php
public static function get(string $name): ?string
    {
        if (isset($_ENV[$name])) {
            return $_ENV[$name];
        }

        if (isset($_SERVER[$name])) {
            return $_SERVER[$name];
        }

        $value = \getenv($name);

        return $value === false ? null : $value; // switch getenv default to null
    }
public static function get(string $name): ?string
    {
        if (isset($_ENV[$name])) {
            return $_ENV[$name];
        }

        if (isset($_SERVER[$name])) {
            return $_SERVER[$name];
        }

        $value = \getenv($name);

        return $value === false ? null : $value; // switch getenv default to null
    }
public static function get ( string $ name ) : ? string { if ( isset ( $ _ENV [ $ name ] ) ) { return $ _ENV [ $ name ] ; } if ( isset ( $ _SERVER [ $ name ] ) ) { return $ _SERVER [ $ name ] ; } $ value = \ getenv ( $ name ) ; return $ value === false ? null : $ value ; // switch getenv default to null }
Search the different places for environment variables and return first value found.

@param string $name

@return string|null
Search the different places for environment variables and return first value found .