If the variable value had no quotes a comment at the end of the line was added to the variable. Spaces between text and comment mark will be removed too Old: FOO=Test # Comment -> $_ENV['FOO'] = "Test # Comment" New: FOO=Test # Comment -> $_ENV['FOO'] = "Test"