src/PhpParser/Printer/BetterStandardPrinter.php
protected function pScalar_String(String_ $node): string
    {
        $kind = $node->getAttribute('kind', String_::KIND_SINGLE_QUOTED);
        if ($kind === String_::KIND_DOUBLE_QUOTED && $node->getAttribute('is_regular_pattern')) {
            return '"' . $node->value . '"';
        }

        return parent::pScalar_String($node);
    }
protected function pScalar_String(String_ $node): string
    {
        $kind = $node->getAttribute('kind', String_::KIND_SINGLE_QUOTED);
        if ($kind === String_::KIND_DOUBLE_QUOTED && $node->getAttribute('is_regular_pattern')) {
            return '"' . $node->value . '"';
        }

        return parent::pScalar_String($node);
    }
protected function pScalar_String ( String_ $ node ) : string { $ kind = $ node -> getAttribute ( 'kind' , String_ :: KIND_SINGLE_QUOTED ) ; if ( $ kind === String_ :: KIND_DOUBLE_QUOTED && $ node -> getAttribute ( 'is_regular_pattern' ) ) { return '"' . $ node -> value . '"' ; } return parent :: pScalar_String ( $ node ) ; }
Fixes escaping of regular patterns
Fixes escaping of regular patterns