xref: /PHP-8.4/Zend/tests/heredoc_016.phpt (revision 782352c5)
1--TEST--
2Testing heredoc (double quotes) 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?>
37--EXPECT--
38bool(true)
39bool(true)
40bool(true)
41bool(true)
42bool(true)
43