public static function parse($str)
    {
        $bLength = 0;
        if ('b' === $str[0]) {
            $bLength = 1;
        }

        if ('\'' === $str[$bLength]) {
            return str_replace(
                ['\\\\', '\\\''],
                ['\\', '\''],
                substr($str, $bLength + 1, -1)
            );
        } else {
            return self::parseEscapeSequences(substr($str, $bLength + 1, -1), '"');
        }
    }
public static function parse($str)
    {
        $bLength = 0;
        if ('b' === $str[0]) {
            $bLength = 1;
        }

        if ('\'' === $str[$bLength]) {
            return str_replace(
                ['\\\\', '\\\''],
                ['\\', '\''],
                substr($str, $bLength + 1, -1)
            );
        } else {
            return self::parseEscapeSequences(substr($str, $bLength + 1, -1), '"');
        }
    }
public static function parse ( $ str ) { $ bLength = 0 ; if ( 'b' === $ str [ 0 ] ) { $ bLength = 1 ; } if ( '\'' === $ str [ $ bLength ] ) { return str_replace ( [ '\\\\' , '\\\'' ] , [ '\\' , '\'' ] , substr ( $ str , $ bLength + 1 , - 1 ) ) ; } else { return self :: parseEscapeSequences ( substr ( $ str , $ bLength + 1 , - 1 ) , '"' ) ; } }
Parses a string token.

@param string $str String token content

@return string The parsed string
Parses a string token .