src/Viserio/Component/Translation/Extractor/PhpParser/ScalarString.php
public static function parseDocString(string $startToken, string $str, bool $parseUnicodeEscape = true): string
    {
        // strip last newline (thanks tokenizer for sticking it into the string!)
        $str = \preg_replace('~(\r\n|\n|\r)\z~', '', $str);

        // nowdoc string
        if (false !== \mb_strpos($startToken, '\'')) {
            return $str;
        }

        return self::parseEscapeSequences($str, null, $parseUnicodeEscape);
    }
public static function parseDocString(string $startToken, string $str, bool $parseUnicodeEscape = true): string
    {
        // strip last newline (thanks tokenizer for sticking it into the string!)
        $str = \preg_replace('~(\r\n|\n|\r)\z~', '', $str);

        // nowdoc string
        if (false !== \mb_strpos($startToken, '\'')) {
            return $str;
        }

        return self::parseEscapeSequences($str, null, $parseUnicodeEscape);
    }
@internal

Parses a constant doc string

@param string $startToken         Doc string start token content (<<<SMTHG)
@param string $str                String token content
@param bool   $parseUnicodeEscape Whether to parse PHP 7 \u escapes

@return string Parsed string