php-parser/test/code/prettyPrinter/expr/stringEscaping.test

33 lines
671 B
Plaintext
Raw Normal View History

Escape sequences in double-quoted strings
-----
<?php
"\n\r\t\f\v\$\"\\";
"@@{ implode(range("\0", "\37")) }@@";
"\0000\0001";
"äöü";
"\xc0\x80";
"\xd0\x01";
2021-04-25 21:47:07 +02:00
"\xf0\x80\x80";
<<<DOC
\n\r\t\f\v\$\"\\
@@{ implode(range("\0", "\37")) }@@
\0000\0001
äöü
DOC;
-----
"\n\r\t\f\v\$\"\\";
"\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\v\f\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f";
"\x000\x001";
"äöü";
"\xc0\x80";
"\xd0\x01";
2021-04-25 21:47:07 +02:00
"\xf0\x80\x80";
<<<DOC
@@{ "\n\r" }@@\t\f\v\$\\"\\
\x00\x01\x02\x03\x04\x05\x06\x07\x08\t@@{ "\n" }@@\v\f@@{ "\r" }@@\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f
\x000\x001
äöü
DOC
;