mirror of
https://github.com/php/php-src.git
synced 2025-01-13 22:44:36 +08:00
33 lines
493 B
Plaintext
33 lines
493 B
Plaintext
|
--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
|