src/Viserio/Component/Translation/Extractor/PhpParser/ScalarString.php
public static function parse(string $str, bool $parseUnicodeEscape = true): string
    {
        $bLength = 0;

        if ('b' === $str[0] || 'B' === $str[0]) {
            $bLength = 1;
        }

        if ('\'' === $str[$bLength]) {
            return \str_replace(
                ['\\\\', '\\\''],
                ['\\', '\''],
                \mb_substr($str, $bLength + 1, -1)
            );
        }

        return self::parseEscapeSequences(
            \mb_substr($str, $bLength + 1, -1),
            '"',
            $parseUnicodeEscape
        );
    }
public static function parse(string $str, bool $parseUnicodeEscape = true): string
    {
        $bLength = 0;

        if ('b' === $str[0] || 'B' === $str[0]) {
            $bLength = 1;
        }

        if ('\'' === $str[$bLength]) {
            return \str_replace(
                ['\\\\', '\\\''],
                ['\\', '\''],
                \mb_substr($str, $bLength + 1, -1)
            );
        }

        return self::parseEscapeSequences(
            \mb_substr($str, $bLength + 1, -1),
            '"',
            $parseUnicodeEscape
        );
    }
@internal

Parses a string token

@param string $str                String token content
@param bool   $parseUnicodeEscape Whether to parse PHP 7 \u escapes

@return string The parsed string