system/Config/DotEnv.php
protected function setVariable(string $name, string $value = '')
	{
		list($name, $value) = $this->normaliseVariable($name, $value);

		if (! getenv($name, true))
		{
			putenv("$name=$value");
		}
		if (empty($_ENV[$name]))
		{
			$_ENV[$name] = $value;
		}
		if (empty($_SERVER[$name]))
		{
			$_SERVER[$name] = $value;
		}
	}
protected function setVariable(string $name, string $value = '')
	{
		list($name, $value) = $this->normaliseVariable($name, $value);

		if (! getenv($name, true))
		{
			putenv("$name=$value");
		}
		if (empty($_ENV[$name]))
		{
			$_ENV[$name] = $value;
		}
		if (empty($_SERVER[$name]))
		{
			$_SERVER[$name] = $value;
		}
	}
Sets the variable into the environment. Will parse the string
first to look for {name}={value} pattern, ensure that nested
variables are handled, and strip it of single and double quotes.

@param string $name
@param string $value