php.net |  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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
36 + 40 = ?
Subscribe to this entry?

 
 [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 `';'' 


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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

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

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