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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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: Sun Dec 22 11:01:30 2024 UTC