NYCPHP Meetup

NYPHP.org

[nycphp-talk] Can code be executed in a heredoc?

James Wetterau james at surgam.net
Wed Feb 18 11:04:31 EST 2004



Adam Maccabee Trachtenberg says:
> On Tue, 17 Feb 2004, Daniel J Cain Jr. wrote:
> 
> > Is it bad form to use the format below?  Instead of escaping all double
> > quotes to use single quotes for the tag attributes.
> >
> > echo "<a href='http://www.nyphp.org'>Link Test</a>";
> 
> While that is technically legal HTML, until someone can prove it to me
> otherwise, I've never trusted that some stupid browser won't barf on
> it.

I've used single quotes for precisely this reason off and on since
about 1995.  It never even occurred to me to worry about it.  I've
never once seen a problem with doing this, but then I've only had nine
years of sporadic experience with it so far.




More information about the talk mailing list