mirror of
https://github.com/php/php-src.git
synced 2024-11-29 04:46:07 +08:00
34 lines
576 B
PHP
34 lines
576 B
PHP
--TEST--
|
|
Torture the T_END_NOWDOC rules with variable expansions (nowdoc)
|
|
--FILE--
|
|
<?php
|
|
|
|
require_once 'nowdoc.inc';
|
|
$fooledYou = '';
|
|
|
|
print <<<'ENDOFNOWDOC'
|
|
{$fooledYou}ENDOFNOWDOC{$fooledYou}
|
|
ENDOFNOWDOC{$fooledYou}
|
|
{$fooledYou}ENDOFNOWDOC
|
|
|
|
ENDOFNOWDOC;
|
|
|
|
$x = <<<'ENDOFNOWDOC'
|
|
{$fooledYou}ENDOFNOWDOC{$fooledYou}
|
|
ENDOFNOWDOC{$fooledYou}
|
|
{$fooledYou}ENDOFNOWDOC
|
|
|
|
ENDOFNOWDOC;
|
|
|
|
print "{$x}";
|
|
|
|
?>
|
|
--EXPECT--
|
|
{$fooledYou}ENDOFNOWDOC{$fooledYou}
|
|
ENDOFNOWDOC{$fooledYou}
|
|
{$fooledYou}ENDOFNOWDOC
|
|
{$fooledYou}ENDOFNOWDOC{$fooledYou}
|
|
ENDOFNOWDOC{$fooledYou}
|
|
{$fooledYou}ENDOFNOWDOC
|
|
|