|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #5804 parser error if any spaces follow indentifier in with here doc syntax
Submitted: 2000-07-27 00:34 UTC Modified: 2010-08-07 01:39 UTC
From: goforth at worldempires dot com Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 4.0.0 OS: Linux
Private report: No CVE-ID: None
 [2000-07-27 00:34 UTC] goforth at worldempires dot com
When using the multi-line echo (here doc syntax) if there are any spaces immediatly following the indenifier, such as here with the space represented by a #

echo <<<EOD#

then php will give the following error message.

Parse error: parse error, expecting `','' or `';'' 


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2000-07-27 11:07 UTC]
EOD# is not a valid identifier.
 [2000-07-27 12:00 UTC]
"... such as here with the space represented by a # ..."

please do a s/#/ /  before reading the statement
to see what it is all about 

 [2000-07-27 12:45 UTC]
label should be immediately followed by newline (i.e., no spaces). 
 [2000-07-27 13:00 UTC]
feature request: whitespace behind a label 
shouldn't matter
 [2010-08-07 01:39 UTC]
-Status: Open +Status: Bogus -Package: Feature/Change Request +Package: *General Issues
 [2010-08-07 01:39 UTC]
Wechanged the parser quite heavil over ten years. closing this bug.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sat Feb 04 11:05:48 2023 UTC