xref: /PHP-8.0/Zend/tests/heredoc_007.phpt (revision ddcf7a2f)
1--TEST--
2braced and unbraced complex variable replacement test (heredoc)
3--FILE--
4<?php
5
6require_once 'nowdoc.inc';
7
8print <<<ENDOFHEREDOC
9This is heredoc test #s $a, {$b}, {$c['c']}, and {$d->d}.
10
11ENDOFHEREDOC;
12
13$x = <<<ENDOFHEREDOC
14This is heredoc test #s $a, {$b}, {$c['c']}, and {$d->d}.
15
16ENDOFHEREDOC;
17
18print "{$x}";
19
20?>
21--EXPECT--
22This is heredoc test #s 1, 2, 3, and 4.
23This is heredoc test #s 1, 2, 3, and 4.
24