Re: nowdocs again
| From: | Stefan Walk | Date: | Thu, 31 Jan 2008 10:17:18 +0000 |
| Subject: | Re: nowdocs again | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-35056@lists.php.net to get a copy of this message | ||
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' ;)
> --
> Stanislav Malyshev, Zend Software Architect
> stas@zend.com http://www.zend.com/
> (408)253-8829 MSN: stas@zend.com
Ruby has, too (stolen from perl ;))
et@edea:~/programming/ruby> cat test.rb
#!/usr/bin/env ruby
var = "ls *.rb"
puts <<"EOT"
#{var}
EOT
puts <<EOT
#{var}
EOT
puts <<'EOT'
#{var}
EOT
puts <<
EOT
#{var}
EOT
et@edea:~/programming/ruby> ruby test.rb
ls *.rb
ls *.rb
#{var}
test.rb
Regards,
Stefan