Re: nowdocs again
| From: | (Wietse Venema) | Date: | Thu, 31 Jan 2008 13:42:08 +0000 |
| Subject: | Re: nowdocs again | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-35058@lists.php.net to get a copy of this message | ||
Stefan Walk:
[ Charset ISO-8859-1 unsupported, converting... ]
> On Wednesday 30 January 2008 20:52:40 Stanislav Malyshev wrote:
> > > I don't think the 'FOO' syntax is very obvious either, but I
> > > can't think
> > > of a better one and if there isn't a commonly known syntax we can steal
> > > from another language, then making up our own, no matter what it is, is
> >
> > We can steal from perl, which has exactly 'FOO' ;)
>
> Ruby has, too (stolen from perl ;))
The syntax pre-dates Perl by many years.
Citing from "An Introduction to the Unix Shell" from S.R. Bourne,
which was part of the UNIX Seventh edition manual from 1978:
<< word
The standard input is taken from the lines of shell input that
follow up to but not including a line consisting only of word.
If word is quoted then no interpretation of the document occurs.
If word is not quoted then parameter and command substitution
occur and \ is used to quote the characters \ $ ` and the first
character of word. In the latter case \newline is ignored (c.f.
quoted strings).
Unfortunately the bell-labs.com sites are gone, but there are many
copies on-line. I found one at http://partmaps.org/era/unix/shell.html
Wietse