public static function getEnv($variable = null) {
		$cmd = preg_match("/WIN/Ai", PHP_OS) ? 'set' : 'printenv';
		$output = self::run($cmd)->output;

		$env = [];

		foreach ($output as $line) {
			list($key, $value) = explode("=", $line, 2);

			if ($variable && strtolower($key) === strtolower($variable)) {
				return $value;
			}

			$env[$key] = $value;
		}

		return $env;
	}