#47516 [Opn->Csd]: nowdoc can not be embed in heredoc but can be embed in double quote

From: Date: Thu, 26 Mar 2009 12:39:55 +0000
Subject: #47516 [Opn->Csd]: nowdoc can not be embed in heredoc but can be embed in double quote
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-135152@lists.php.net to get a copy of this message
ID: 47516 Updated by: dmitry@php.net Reported By: kexianbin at diyism dot com -Status: Open +Status: Closed Bug Type: Scripting Engine problem Operating System: windows xp PHP Version: 5.3CVS-2009-02-27 (snap) -Assigned To: +Assigned To: dmitry New Comment: This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2009-02-27 03:36:48] kexianbin at diyism dot com Description: ------------ why nowdoc can not be embed in heredoc but can be embed in double quote? Why the second paragraph is right(using double quote), while the commented is not right(using nowdoc)? <? $s='substr'; /* $htm=<<<DOC {$s(<<<'ppp' abcdefg ppp ,0,3)} DOC; */ $htm=" {$s(<<<'ppp' abcdefg ppp ,0,3)} "; echo $htm; ?> Expected result: ---------------- Output 'abc' Actual result: -------------- Output: Parse error: parse error, expecting `'}'' ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=47516&edit=1

« previous php.bugs (#135152) next »