xref: /PHP-8.0/Zend/tests/heredoc_015.phpt (revision 782352c5)
1--TEST--
2Testing heredoc with escape sequences
3--FILE--
4<?php
5
6$test = <<<TEST
7TEST;
8
9var_dump(strlen($test) == 0);
10
11$test = <<<TEST
12\
13TEST;
14
15var_dump(strlen($test) == 1);
16
17$test = <<<TEST
18\0
19TEST;
20
21var_dump(strlen($test) == 1);
22
23$test = <<<TEST
24\n
25TEST;
26
27var_dump(strlen($test) == 1);
28
29$test = <<<TEST
30\\'
31TEST;
32
33var_dump(strlen($test) == 2);
34
35?>
36--EXPECT--
37bool(true)
38bool(true)
39bool(true)
40bool(true)
41bool(true)
42