php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #47618 Say how to turn of interpolation on <<< here documents.
Submitted: 2009-03-11 02:45 UTC Modified: 2009-06-26 06:59 UTC
From: jidanni at jidanni dot org Assigned: kalle (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
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: jidanni at jidanni dot org
New email:
PHP Version: OS:

 

 [2009-03-11 02:45 UTC] jidanni at jidanni dot org
Description:
------------
On function.print.html you mention print <<<END

Now as everybody knows, the shell and perl both have ways to "quote"
"END" to turn off $ interpolation.

However for PHP it is a mystery how to do this.

Say explicitly whether of not PHP has such a capability, and if so
how.

(As it stands, you don't even say if we can use anything other than
"END", e.g., "MYEND".)


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-03-11 03:00 UTC] philip@php.net
The print documentation is not meant to explain PHP syntax, string 
(heredoc) or otherwise. However, the documentation you desire is located 
here:

http://php.net/types.string

It appears you're interested in nowdoc, which is the sister of heredoc.


 [2009-03-11 03:19 UTC] jidanni at jidanni dot org
OK. Please put a see-also link to it on function.print.html, as that's what we hit when searching for <<< in certain search engines.
 [2009-03-11 07:54 UTC] bjori@php.net
You should use our lookup search then:
http://php.net/<<< sends you to the correct page :)

I guess a seealso from echo and print would be useful though.
 [2009-06-26 06:59 UTC] kalle@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.

What your looking for is possible as of PHP 5.3.0 using the NOWDOC syntax, its available at:
http://php.net/<<<

However I have added a link in the see also section to the HEREDOC section for both echo and print.
 [2020-02-07 06:10 UTC] phpdocbot@php.net
Automatic comment on behalf of kalle
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=8c633782acb362e1c10971e60d699b3b1058a920
Log: Fixed #47618 (Say how to turn of interpolation on &lt;&lt;&lt; here documents)
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Oct 08 09:00:02 2026 UTC