Re: I am RTFM, but still stumbling on how to get built-in functions parsed in heredoc

From: Date: Sat, 11 Jul 2009 23:20:06 +0000
Subject: Re: I am RTFM, but still stumbling on how to get built-in functions parsed in heredoc
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.general 
Request: Send a blank email to php-general+get-295250@lists.php.net to get a copy of this message
On Sat, Jul 11, 2009 at 5:37 PM, tedd<tedd.sperling@gmail.com> wrote: > At 3:34 AM +0700 7/12/09, Lenin wrote: >> >> On Sun, Jul 12, 2009 at 2:56 AM, Eddie Drapkin <oorza2k5@gmail.com> wrote: >> >>>  On Sat, Jul 11, 2009 at 3:53 PM, Govinda<govinda.webdnatalk@gmail..com> >> >>  > wrote: >>  > > what does "EOT" stand for? >>> >>>  > (I realize that string can be anything..  but I am just asking what >>> EOT >> >>  > > means to everyone? >>  > >>  > I just use it as "End of Term" because I'm used to "EOF" as >> "End of >> File" >> >> EOT used to mean  End of Text. reference ASCII-7 notatioin > > > Yes, but in both cases the operator is used at both the beginning AND at the > end of the heredoc. I normally don't start anything with an "End" term. > > That's what I liked about the underscore (_) -- there's no inference that > it's an acronym. > > $whatever = <<<_ > whatever > _; > > However with that said, one could come up with a dual purpose acronym like: > > TO  = (TEXT On or TEXT Off) > > or if you need three characters. > > HDO = (HEREDOC ON or HEREDOC OFF) > > I'm sure some clever person could come up with something better. > > Cheers, > > tedd When I see something like $foo = <<<EOT //stuff EOT; I always read "<<<EOT" as "until EOT" or, "until End of Text/Term". So, the whole statement, in my head, would be "$foo is equal to everything following until End of Text." Although, less generic names like HTML, or XML, or ROW can also be fine, too.

« previous php.general (#295250) next »