The Cache: Technology Expert's Forum
 
*
Welcome, Guest. Please login or register. September 23, 2019, 10:22:34 AM

Login with username, password and session length


Pages: [1]
  Print  
Author Topic: PHP Helper: the <<< or Heredoc operator  (Read 18234 times)
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« on: September 19, 2007, 01:09:51 PM »

I had the dickens of a time trying to find support on the <<< or Heredoc operator when I first saw it a few years ago... because I had no idea what it was called ROFLMAO . The first time I saw it in someone else's code I was intrigued but baffled. So for anyone interested and still in the dark about this fantastic tool, here is a link to the documentation:

http://us3.php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc

Justa t4td...
/p

<spam mode="so other poor saps can find this thread">
Multiline text tool in php.
Multiple line operator for large strings in php.
large string operator, php
inline strings php operator <<<
<<< operator command tool php
multiline text
How do I put multiple lines in php scripts
</spam>
« Last Edit: September 19, 2007, 01:15:34 PM by perkiset » Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
m0nkeymafia
Expert
****
Offline Offline

Posts: 240


Check it!


View Profile
« Reply #1 on: September 19, 2007, 02:19:09 PM »

great perk cheers
exactly what i wanted!
Logged

I am Tyler Durden
thedarkness
Lifer
*****
Offline Offline

Posts: 585



View Profile
« Reply #2 on: September 19, 2007, 11:14:36 PM »

Doh! Just posted a comment on this in the "really simple synomizer function" thread. As a matter of interest, here is a reference to it as early (perhaps) as 1977 (if it was in the original "bourne shell") in V7 unix.

Cheers,
td
Logged

"I want to be the guy my dog thinks I am."
 - Unknown
JasonD
Expert
****
Offline Offline

Posts: 100


View Profile
« Reply #3 on: September 20, 2007, 05:49:14 AM »

Cheers Perk

I've been using that operator for many many years in Perl and never known the name of it, though  just opened up the O Reilly camel book (one of my older Perl books) and seen it is the 1996 second edition and it is documented in there on page 43 so I should know. I guess I never read it! Smiley
Logged
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #4 on: September 20, 2007, 09:01:51 AM »

It's funny JD... in old languages, I knew everything about everything about them... because they'd come with a for-reals manual and as soon as I had the basics under my belt I'd go hide and read the whole thing.

But with the newfangled stuff (particularaly PHP and JS) you can buy all kindso books, but they'll just show what *they* think is important, and not necessarily dump the whole language as a reference. So if you don't know what to call something, it's not googlable. Makes for a sort of dungeons and dragons approach to learning new languages that I'm really not sure I like...
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
Pages: [1]
  Print  
 
Jump to:  

Perkiset's Place Home   Best of The Cache   phpMyIDE: MySQL Stored Procedures, Functions & Triggers
Politics @ Perkiset's   Pinkhat's Perspective   
cache
mart
coder
programmers
ajax
php
javascript
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS!