php-parser/test/code/prettyPrinter/expr/stringEscaping.test
Nikita Popov 38aa0920c9 Add test for UTF-8 in string
These should not get escaped.
2021-03-21 17:03:15 +01:00

27 lines
521 B
Plaintext

Escape sequences in double-quoted strings
-----
<?php
"\n\r\t\f\v\$\"\\";
"@@{ implode(range("\0", "\37")) }@@";
"\0000\0001";
"äöü";
<<<DOC
\n\r\t\f\v\$\"\\
@@{ implode(range("\0", "\37")) }@@
\0000\0001
äöü
DOC;
-----
"\n\r\t\f\v\$\"\\";
"\0\1\2\3\4\5\6\7\10\t\n\v\f\r\16\17\20\21\22\23\24\25\26\27\30\31\32\33\34\35\36\37";
"\0000\0001";
"äöü";
<<<DOC
@@{ "\n\r" }@@\t\f\v\$\\"\\
\0\1\2\3\4\5\6\7\10\t@@{ "\n" }@@\v\f@@{ "\r" }@@\16\17\20\21\22\23\24\25\26\27\30\31\32\33\34\35\36\37
\0000\0001
äöü
DOC
;