I only caught this after putting a copy of my script on my webserver with .phps extension and looking at it, and noticing that after the heredoc, all syntax highlighting stopped.
So, I guess even though HEREDOC might be more pleasing to read (imho), it has a nasty class of syntax error that is *very* hard to detect (since it is very hard to 'see' that you have whitespace after the token). Caveat coder.
Actually, I think I just figured out where the whitespace came from. My text editor has a feature, normally usefull, to do automatic indenting when you start a new line of code. I think it indented the cursor 4 spaces, and I hit 'home' and typed the delimiting token, and forgot about the whitespace at the end (normally, whitespace is ignored/collapsed by the parser).
Jeff Schmidt
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php