php-src/Zend/tests/heredoc_010.phpt
2008-02-12 09:27:45 +00:00

33 lines
493 B
PHP

--TEST--
Torture the T_END_HEREDOC rules with variable expansions (heredoc)
--FILE--
<?php
require_once 'nowdoc.inc';
$fooledYou = '';
print <<<ENDOFHEREDOC
{$fooledYou}ENDOFHEREDOC{$fooledYou}
ENDOFHEREDOC{$fooledYou}
{$fooledYou}ENDOFHEREDOC
ENDOFHEREDOC;
$x = <<<ENDOFHEREDOC
{$fooledYou}ENDOFHEREDOC{$fooledYou}
ENDOFHEREDOC{$fooledYou}
{$fooledYou}ENDOFHEREDOC
ENDOFHEREDOC;
print "{$x}";
?>
--EXPECT--
ENDOFHEREDOC
ENDOFHEREDOC
ENDOFHEREDOC
ENDOFHEREDOC
ENDOFHEREDOC
ENDOFHEREDOC