php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #9387 Doc String Quoting Problem
Submitted: 2001-02-21 17:21 UTC Modified: 2001-02-21 18:42 UTC
From: jeffdl at mn dot mediaone dot net Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 4.0.4pl1 OS: RedHat Linux 7.0
Private report: No CVE-ID: None
 [2001-02-21 17:21 UTC] jeffdl at mn dot mediaone dot net
When you are using doc string quoting or something, php doesn't recognize the thing that stops it if indented at all or something.  There are two examples to illistrate my point:

echo <<<BARFY
This is a good example.
It works perfectly.
BARFY

echo <<<BARFY
This is a bad example.
It fails miserably.
Note the space before BARFY.
 BARFY


Maybe this is a bug, maybe it is a feature.  I don't know, but please fix it or make note of it in the manual.  Thanks.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-02-21 17:38 UTC] torben@php.net
This is not a bug. Check the third sentence below, from the PHP Manual at http://www.php.net/manual/en/language.types.string.php:

 Another way to delimit strings is by using here doc syntax ("<<<"). One should 
 provide an identifier after <<<, then the string, and then the same identifier to 
 close the quotation. The closing identifier must begin in the first column of the 
 line. The label used must follow the same naming rules as any other label in PHP: 
 it must contain only alphanumeric characters and underscores, and must start with 
 a non-digit character or underscore. 


 [2001-02-21 18:31 UTC] torben@php.net
The doc part is taken care of, I'm reopening in case someone wants to present
a really good solution. :)
 [2001-02-21 18:42 UTC] andre@php.net
the indenting issue is already present as RFE in the db
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 08:01:28 2024 UTC