ID: 50654
Updated by: [email protected]
Reported By: thuejk at gmail dot com
-Status: Open
+Status: Wont fix
Bug Type: Scripting Engine problem
Operating System: Debian Linux Unstable
PHP Version: 5.2.12
New Comment:
This works in 5.3 by using a new parser. Quite risky to change the
parser in 5.2.
Previous Comments:
------------------------------------------------------------------------
[2010-01-04 13:09:22] thuejk at gmail dot com
Description:
------------
Embedding a heredoc inside another heredoc fails to compile on 5.2.12.
(The same code successfully compiles on 5.2.4-ubuntu, but running it
has the wrong output.)
Reproduce code:
---------------
<?php
$a = Array("b" => 1);
echo <<<ZZ
{$a[<<<B
b
B
]}
ZZ;
?>
Expected result:
----------------
1
Actual result:
--------------
Parse error: syntax error, unexpected $end in /home/thue/test.php on
line 11
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=50654&edit=1