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
 [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

Pull Requests

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: Sat Nov 23 17:01:28 2024 UTC