xref: /PHP-5.3/Zend/tests/heredoc_010.phpt (revision ddcf7a2f)
1--TEST--
2Torture the T_END_HEREDOC rules with variable expansions (heredoc)
3--FILE--
4<?php
5
6require_once 'nowdoc.inc';
7$fooledYou = '';
8
9print <<<ENDOFHEREDOC
10{$fooledYou}ENDOFHEREDOC{$fooledYou}
11ENDOFHEREDOC{$fooledYou}
12{$fooledYou}ENDOFHEREDOC
13
14ENDOFHEREDOC;
15
16$x = <<<ENDOFHEREDOC
17{$fooledYou}ENDOFHEREDOC{$fooledYou}
18ENDOFHEREDOC{$fooledYou}
19{$fooledYou}ENDOFHEREDOC
20
21ENDOFHEREDOC;
22
23print "{$x}";
24
25?>
26--EXPECT--
27ENDOFHEREDOC
28ENDOFHEREDOC
29ENDOFHEREDOC
30ENDOFHEREDOC
31ENDOFHEREDOC
32ENDOFHEREDOC
33