NYCPHP Meetup

NYPHP.org

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

Dan Cech dcech at phpwerx.net
Wed Feb 18 13:47:45 EST 2004


Adam Maccabee Trachtenberg wrote:
> 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.

Yes Adam, I am not attacking your statement, but merely commenting that 
this *type* of question can become complicated when dealing with the 
different versions of HTML.

>>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.

I understand your point, which was why my statement was put in terms of 
conformance to the HTML standard, the issue of browser support is 
completely separate.  I am deliberately not commenting on that issue 
because personally I have never used single-quoted attribute values in 
any HTML or XML document.

What I was interested in was other possible reasons people had for 
choosing one quoting method over the other.

Dan




More information about the talk mailing list