src/Viserio/Component/Parser/Dumper/PoDumper.php
protected function cleanExport(string $string): string
    {
        $replaces = [
            '\\' => '\\\\',
            '"'  => '\"',
            "\t" => '\t',
        ];

        $string = \str_replace(\array_keys($replaces), \array_values($replaces), $string);
        $po     = '"' . \implode('$' . "\n" . '"' . $this->eol . '"', \explode($this->eol, $string)) . '"';

        // remove empty strings
        return \str_replace($this->eol . '""', '', $po);
    }
protected function cleanExport(string $string): string
    {
        $replaces = [
            '\\' => '\\\\',
            '"'  => '\"',
            "\t" => '\t',
        ];

        $string = \str_replace(\array_keys($replaces), \array_values($replaces), $string);
        $po     = '"' . \implode('$' . "\n" . '"' . $this->eol . '"', \explode($this->eol, $string)) . '"';

        // remove empty strings
        return \str_replace($this->eol . '""', '', $po);
    }
Prepares a string to be outputed into a file.

@param string $string the string to be converted

@return string