#50654 [Opn->WFx]: Nested heredocs fail

From: Date: Mon, 04 Jan 2010 13:44:37 +0000
Subject: #50654 [Opn->WFx]: Nested heredocs fail
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-146315@lists.php.net to get a copy of this message
ID: 50654 Updated by: johannes@php.net 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

« previous php.bugs (#146315) next »