src/Viserio/Component/Translation/Extractor/PhpParser/ScalarString.php
public static function parseEscapeSequences(string $str, $quote, bool $parseUnicodeEscape = true): string
    {
        if (null !== $quote) {
            $str = \str_replace('\\' . $quote, $quote, $str);
        }
        $extra = '';

        if ($parseUnicodeEscape) {
            $extra = '|u\{([0-9a-fA-F]+)\}';
        }

        return \preg_replace_callback(
            '~\\\\([\\\\$nrtfve]|[xX][0-9a-fA-F]{1,2}|[0-7]{1,3}' . $extra . ')~',
            static function ($matches) {
                $str = $matches[1];

                if (isset(self::$replacements[$str])) {
                    return self::$replacements[$str];
                }

                if ('x' === $str[0] || 'X' === $str[0]) {
                    return \chr((int) \hexdec($str));
                }

                if ('u' === $str[0]) {
                    // @codeCoverageIgnoreStart
                    return self::codePointToUtf8((int) \hexdec($matches[2]));
                    // @codeCoverageIgnoreEnd
                }

                return \chr(\octdec($str));
            },
            $str
        );
    }
public static function parseEscapeSequences(string $str, $quote, bool $parseUnicodeEscape = true): string
    {
        if (null !== $quote) {
            $str = \str_replace('\\' . $quote, $quote, $str);
        }
        $extra = '';

        if ($parseUnicodeEscape) {
            $extra = '|u\{([0-9a-fA-F]+)\}';
        }

        return \preg_replace_callback(
            '~\\\\([\\\\$nrtfve]|[xX][0-9a-fA-F]{1,2}|[0-7]{1,3}' . $extra . ')~',
            static function ($matches) {
                $str = $matches[1];

                if (isset(self::$replacements[$str])) {
                    return self::$replacements[$str];
                }

                if ('x' === $str[0] || 'X' === $str[0]) {
                    return \chr((int) \hexdec($str));
                }

                if ('u' === $str[0]) {
                    // @codeCoverageIgnoreStart
                    return self::codePointToUtf8((int) \hexdec($matches[2]));
                    // @codeCoverageIgnoreEnd
                }

                return \chr(\octdec($str));
            },
            $str
        );
    }
@internal

Parses escape sequences in strings (all string types apart from single quoted)

@param string      $str                String without quotes
@param null|string $quote              Quote type
@param bool        $parseUnicodeEscape Whether to parse PHP 7 \u escapes

@return string String with escape sequences parsed