|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2014-09-17 05:08 UTC] jmichae3 at yahoo dot com
Description: ------------ in my menu generation code (not this script, but similar, php acts differently. instead of generating an error (it should not), it fails silently and appends the following PHP source code into the string in addition to the string content itself, up to a certain point. the HTML output from PHP from the pastebin code ends up being http://pastebin.com/78Mx80V2 $s .= printbreadcrumbsmenu($xmlArray, $filepath, /*array('LI','USER','USERS','VISITOR','VISITORS'), */true); $s .= printbreadcrumbsmenu($xmlArray, $filepath, /*array('MODERATOR','MODERATORS'), */false); $s .= printbreadcrumbsmenu($xmlArray, $filepath, /*array('ADMIN','ADMINS','ADMINISTRATOR','ADMINISTRATORS'), */false); $s .= printbreadcrumbsmenu($xmlArray, $filepath, /*array('LEADERSHIP','LEADERS','LEADER'), */false); $s .= " </div>\n"; $s .= <<<'EOT' and EOT; if ((bool)$isxhtml) { $s .= $menuhelptextx; } else { $s .= $menuhelptext; } $s .= <<<'EOT' should not be there in the generated HTML source, those are php functions. it seems like php is ignoring the EOT; Test script: --------------- <?php $s=""; $s.= <<<'EOT' this is <html lang='en'> <title>a title</title> EOT; echo $s; ?> http://pastebin.com/fE5CaVEE for the one mentioned in Description. Expected result: ---------------- should follow the manual in how it works. should not work just for initialization only but for concatenation, and echo as well, any place where you can use a string. expected HTML output: http://pastebin.com/SYQ4GSWG Actual result: -------------- EOT; ignored and therefore php source code is included into the string including the EOT; (until when?) PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 07 22:00:01 2026 UTC |
${'http_prefix'} within the properly formatted nowdoc is not being expanded. it's broken. please fix. thanks. if it's at all possible, could the EOT (whatever used) for heredoc, nowdoc please work for beyond just the beginning of a line? I need most of those strings to end with some indentation. thanks. in fact, I will make it a feature request if it's not already one. there may be lexer reasons for this, but I need this feature. "" doesn't do this sort of thing anymore, it used to, but no longer, that's broken, no longer works with strings like $s="abc def ghi ";correction to that last statement, multiline "" strings do work. not sure what I was seeing. d:\www\Jesusnjim>php <?php $s=5; $t=<<<'EOT' abc${'s'}def$s EOT; echo $t; ?> ^Z abc${'s'}def$s this is what I am talking about, I suppose I should submit another bug report for this one?