Thread: <<< text
View Single Post

  #3 (permalink)  
Old 12-13-2003
John Dunlop
 
Posts: n/a
Default Re: <<< text

Double U wrote:

> What does the "<<<END" do? (from :http://justinvincent.com/home/articl...cleId=8&page=2)


The "<<<" tells us that heredoc syntax is used.
http://www.php.net/manual/en/language.types.string.php

By the way, I'd take whatever you read from that article with a pinch
of salt; on second thoughts, better make that a teaspoonful. I only
read the document you linked to, because I found it awfully yawn-
inducing, but I lost count of the mistakes and statements which may
lead well-intentioned folks astray.

For example, in heredoc syntax, the closing identifier ("END" in this
case) must be directly preceded by a newline. No other characters,
except an affixable semicolon, are allowed on that line.
Unfortunately the markup used in the article, more often than not,
causes indentation in a visual presentation, giving a misleading
suggestion that whitespace is permitted before the closing
identifier. That's simply not the case.

And, sorry, I can't resist mentioning the clueless use of "smart
quotes" in place of proper QUOTATION MARKs. They're meaningless in
both your posting and the article itself. It's not entirely obvious
who wrote the article and the last thing I want to do right now is
trawl through a site like that. Bah, humbug. ;-)

--
Jock
Reply With Quote