0) { // Check if value is a comment (usually triggered when empty value with comment) if (preg_match('/^#/', $value) > 0) { $value = ''; } else { throw new InvalidFileException('Dotenv values containing spaces must be surrounded by quotes.'); } } return trim($value); } }