xref: /PHP-8.0/Zend/tests/bug47516.phpt (revision 95a522a7)
1--TEST--
2Bug #47516 (nowdoc can not be embed in heredoc but can be embed in double quote)
3--FILE--
4<?php
5$s='substr';
6
7$htm=<<<DOC
8{$s(<<<'ppp'
9abcdefg
10ppp
11,0,3)}
12DOC;
13
14echo "$htm\n";
15
16$htm=<<<DOC
17{$s(<<<ppp
18abcdefg
19ppp
20,0,3)}
21DOC;
22
23echo "$htm\n";
24
25$htm="{$s(<<<'ppp'
26abcdefg
27ppp
28,0,3)}
29";
30
31echo "$htm\n";
32?>
33--EXPECT--
34abc
35abc
36abc
37