RE: [PHP] What does "<<<" mean?
| From: | Richard Lynch | Date: | Wed, 02 May 2007 20:30:11 +0000 |
| Subject: | RE: [PHP] What does "<<<" mean? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-254268@lists.php.net to get a copy of this message | ||
On Mon, April 30, 2007 6:33 pm, Daevid Vincent wrote:
>> echo "BROWSER: " . $_SERVER['HTTP_USER_AGENT'] . "\n";
>
> I've always had problems with heredoc when I try using arrays like
> that. I
> will either pull them into a straight $foo, or use the ${} thing.
It probably won't do 2-D arrays, but 1-D should be fine.
>> echo <<<EOF
>> BROWSER: $_SERVER[HTTP_USER_AGENT]
>> EOF;
>
> Isn't that form (sans quote marks) deprecated and frowned upon?
I think it was for a brief period, but the masses revolted and said
they LIKED the non-apostrophe embedded arrays with no extra syntax...
The preceding is a gross-oversimplifaction and biased interpretation
of historical events in the PHP Community. Apologies to all involved.
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?