system/Config/DotEnv.php
public function load(): bool
	{
		// We don't want to enforce the presence of a .env file,
		// they should be optional.
		if (! is_file($this->path))
		{
			return false;
		}

		// Ensure file is readable
		if (! is_readable($this->path))
		{
			throw new \InvalidArgumentException("The .env file is not readable: {$this->path}");
		}

		$lines = file($this->path, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);

		foreach ($lines as $line)
		{
			// Is it a comment?
			if (strpos(trim($line), '#') === 0)
			{
				continue;
			}

			// If there is an equal sign, then we know we
			// are assigning a variable.
			if (strpos($line, '=') !== false)
			{
				$this->setVariable($line);
			}
		}

		return true; // for success
	}
public function load(): bool
	{
		// We don't want to enforce the presence of a .env file,
		// they should be optional.
		if (! is_file($this->path))
		{
			return false;
		}

		// Ensure file is readable
		if (! is_readable($this->path))
		{
			throw new \InvalidArgumentException("The .env file is not readable: {$this->path}");
		}

		$lines = file($this->path, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);

		foreach ($lines as $line)
		{
			// Is it a comment?
			if (strpos(trim($line), '#') === 0)
			{
				continue;
			}

			// If there is an equal sign, then we know we
			// are assigning a variable.
			if (strpos($line, '=') !== false)
			{
				$this->setVariable($line);
			}
		}

		return true; // for success
	}
The main entry point, will load the .env file and process it
so that we end up with all settings in the PHP environment vars
(i.e. getenv(), $_ENV, and $_SERVER)

@return boolean