mirror of
https://github.com/php/php-src.git
synced 2024-12-18 14:30:35 +08:00
33 lines
493 B
PHP
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
|