[nycphp-talk] Can code be executed in a heredoc?
Adam Maccabee Trachtenberg
adam at trachtenberg.com
Wed Feb 18 13:28:30 EST 2004
On Wed, 18 Feb 2004, Dan Cech wrote:
> James Wetterau wrote:
> > I believe, but am not certain, that either single or double quotes
> > have been acceptable continuously since HTML 1.0. As I mentioned,
> > I've used single quotes widely since about 1995 and never noticed
> > trouble. It never even occurred to me to give it a second thought
> > until this day.
>
> Yes, in both HTML and XML single and double quotes have both been
> allowed since the dawn of time (basically because both are allowed in
> SGML). My comment was meant in a broader sense in that it is not as
> simple as saying the a particular thing is 'valid HTML' as the language
> has evolved and what was valid HTML 3.2 may not be valid HTML 4.0, etc.
Normally I would have specficied a DOCTYPE to go along with my
statement, but since single and double quotes are valid in ALL versions
of HTML, I didn't bother to qualify my claim.
> Indeed, on this particular issue as long as you use a form of quoting
> you should be safe in terms of adhering to the standard.
This is exactly the *opposite* of what I was claiming. I *know* the
standard has (and probably always will) allow me to use either form of
quotation marks. However, since when has it been safe to rely upon
browsers to correctly implement the HTML standards?
My point is that *I don't trust* browsers to actually respect single
quotes as correct *even though it's in the standard.* I'm sure that
I've been burned by this before, but I just can't remember if it was
by some random user-agent back in 1995 that only runs on Mac OS 7.1. :)
Based on James' comments, however, it's probably safe to start using
them again.
-adam
--
adam at trachtenberg.com
author of o'reilly's php cookbook
avoid the holiday rush, buy your copy today!
More information about the talk
mailing list