xref: /PHP-5.5/Zend/tests/heredoc_009.phpt (revision ddcf7a2f)
1--TEST--
2Torture the T_END_HEREDOC rules (heredoc)
3--FILE--
4<?php
5
6require_once 'nowdoc.inc';
7
8print <<<ENDOFHEREDOC
9ENDOFHEREDOC    ;
10    ENDOFHEREDOC;
11ENDOFHEREDOC
12    ENDOFHEREDOC
13$ENDOFHEREDOC;
14
15ENDOFHEREDOC;
16
17$x = <<<ENDOFHEREDOC
18ENDOFHEREDOC    ;
19    ENDOFHEREDOC;
20ENDOFHEREDOC
21    ENDOFHEREDOC
22$ENDOFHEREDOC;
23
24ENDOFHEREDOC;
25
26print "{$x}";
27
28?>
29--EXPECTF--
30Notice: Undefined variable: ENDOFHEREDOC in %s on line %d
31ENDOFHEREDOC    ;
32    ENDOFHEREDOC;
33ENDOFHEREDOC
34    ENDOFHEREDOC
35;
36
37Notice: Undefined variable: ENDOFHEREDOC in %s on line %d
38ENDOFHEREDOC    ;
39    ENDOFHEREDOC;
40ENDOFHEREDOC
41    ENDOFHEREDOC
42;
43