php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7442 problem with "print <<< END"
Submitted: 2000-10-24 18:19 UTC Modified: 2000-10-25 15:08 UTC
From: huppe at mailtag dot com Assigned:
Status: Closed Package: Apache related
PHP Version: 4.0.3pl1 OS: FreeBSD 4.1.1-Release
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: huppe at mailtag dot com
New email:
PHP Version: OS:

 

 [2000-10-24 18:19 UTC] huppe at mailtag dot com
I have a minor problem but it does not stop my server
from functioning.  If I put the following in one of my
server scripts it will fail:

function foo() {
	print <<< END
	html data....
	END;
}

However this will work fine:

function foo() {
	print <<< END
	same html data
END;
}

I am running the mod_php4.0.3pl1 and Apache-1.3.14
packages on a FreeBSD system.  Please let me know 
if you require any other info.  I don't know if Zend
was compiled into mod_php4.0.3pl1.  

Thanks for a great tool to work with :)

Len Huppe
huppe@mailtag.com  

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-10-25 15:08 UTC] torben@php.net
This isn't a bug. From the manual:

   http://www.php.net/manual/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.

The 3rd sentence is the relevant one. Hope this helps.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 14 11:01:32 2024 UTC