Edit report at http://bugs.php.net/bug.php?id=53672&edit=1
ID: 53672
Comment by: flavius dot as at gmail dot com
Reported by: dicugeorge1987 at yahoo dot com
Summary: Parser inconsistency for nowdoc/Heredoc vs. "normal"
variable assignment at EOF
Status: Open
Type: Bug
Package: Scripting Engine problem
Operating System: Windows 7 64bit
PHP Version: 5.3.5
Block user comment: N
Private report: N
New Comment:
Note that this will work though:
<?php
$foo = 'bar';
Previous Comments:
------------------------------------------------------------------------
[2011-01-06 16:36:48] dicugeorge1987 at yahoo dot com
Description:
------------
Nowdocs and heredocs should also be LALR-reduced when EOF follows after
T_END_HEREDOC, not only EOL
Test script:
---------------
<?php
$bar = <<<'EOD'
$foo is a variable
EOD;
Expected result:
----------------
$foo is a variable
Actual result:
--------------
Parse error: syntax error, unexpected $end, expecting T_VARIABLE or
T_END_HEREDOC or T_DOLLAR_OPEN_CURLY_BRACES or T_CURLY_OPEN in
J:\webdev\apache\htdocs\salut2.php on line 4
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=53672&edit=1