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