Yep, this is the downside of PHP allowing newlines inside quoted strings. I guess it should be some consolation to know the cause of your agony is a side effect of a feature that some consider very useful.
And I do run the command-line version of PHP locally, for the precise purpose of getting a quick-and-dirty syntax/parse check before I upload things to the server.