1<?php 2 3$a = <<<EOS 4; function bug1() {}; 5EOS; 6 7$b = <<<'EOS' 8; function bug2() {}; 9EOS; 10 11$c = <<<"EOS" 12; function bug3() {}; 13EOS; 14 15/* PHP 7.3+ relaxed syntax */ 16 17$d = <<<EOS 18; function bug4() {}; 19EOS . 'suffix'; 20 21 22$e = <<<EOS 23 ; function bug5() {}; 24 EOS ; 25 26# $f = "EOSNOTYES" 27$f = <<<EOS 28 EOSNOT 29 ; function bug6() {}; 30 EOS."YES"; 31 32# $g = 46 33$g = <<<EOS 34 42 35 EOS+4; 36 37/* check we get the right value out of the heredocs */ 38 39define(<<<EOS 40constant1 41EOS 42, 42); 43 44define(<<<EOS 45constant2 46EOS, 43); 47 48define(<<<EOS 49 constant3 50 EOS, 43); 51 52define(<<<EOS 53 constant4 54 EOS, 44); 55 56# just to check we're correctly out of a heredoc/nowdoc here 57$zzz_end = 42; 58