summaryrefslogtreecommitdiff
path: root/Zend/tests/flexible-heredoc-complex-test4.phpt
blob: 5be0f442f62fe9553842c240d232bc41ecdcd8ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
--TEST--
Flexible heredoc syntax complex test 4: interpolated variable with
the same delimiter name as the heredoc
--FILE--
<?php

{
    $FOO = "FOO";
    define("FOO", "FOO");
    $b = <<<FOO
    Test
    ${
        FOO
    }
    FOO;
    var_dump($b);
}

{
    $FOO = "FOO";
    $b = <<<FOO
        Test
        ${
        FOO
        }
    FOO;
    var_dump($b);
}

?>
--EXPECT--
string(8) "Test
FOO"
string(16) "    Test
    FOO"