mirror of
https://github.com/php/php-src.git
synced 2024-12-01 05:43:38 +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
|
|
|