Re: What does "<<<" mean?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/30/07, Richard Davey <rich@xxxxxxxxxxxxx> wrote:
I'm not dissing heredoc syntax, it has its uses (now and again) but it's
far from "clean", especially when embedded deep in classes

Classes?  PHP is the absolute worst language to do OO programming in.
If you like OO, move on to ruby or python, you'll be much happier.  Or
you can wait around until PHP fully (d)evolves into Java.

the major
cause being the delimeters insistance on being at the very start of the
line.

All parts of a heredoc statement do not have to be right justified,
only the closing line.

It's just *not* pretty IMHO. Certainly not girl code [1]

Mmmm..  girls..  coding..  :)

The frowning surely would be at the mixing of logic and presentation,

Sounds like you got MVC-itis.  PHP can't really help with that since
it's a templating language.

Try Rubyonrails, it's the best cure for the MVC itch.

regardless how that mix happens (heredoc, echo, jumping in and out of
PHP tags, sprintf, etc).

I love me some heredoc syntax:

#!/usr/bin/env perl -w

$x = <<END;
hello world!
END

print $x;


#!/usr/bin/env ruby -w

x = <<END
hello world!
END

puts x


#!/usr/bin/env python

x = """
hello world!
"""

print x



--
Greg Donald
http://destiney.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux