NYCPHP Meetup

NYPHP.org

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

James Wetterau james at surgam.net
Wed Feb 18 11:22:48 EST 2004



Dan Cech says:
...
> Indeed, you are correct in that specification allows it, my point was 
> that depending on whether you interpret 'HTML' as HTML 3.2, 4.0, 4.01, 
> XHTML 1.0, or any of the flavours thereof, what is 'technically legal' 
> can vary quite widely.

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.

I probably first learned the formal description of HTML by looking at
the HTML draft RFC from June 1993.  That RFC describes an attribute as
being included either between single quotes or double quotes.
Therefore, it seems that from day one of HTML single quotes have been
permitted, and were actually the first listed option.

I would be tremendously surprised to learn that some intermediate
version of HTML had broken backward compatability on this issue.

http://www.w3.org/MarkUp/draft-ietf-iiir-html-01.txt

   Hypertext Markup Language (HTML)          Tim Berners-Lee, CERN
   Internet Draft                          Daniel Connolly, Atrium
   IIIR Working Group                                    June 1993

   
                      Hypertext Markup Language (HTML)

...
   Attributes
    
   In a start tag, whitespace and attributes are allowed between the
   element name and the closing delimiter. An attribute consists of a
   name, an equal sign, and a value. Whitespace is allowed around the
   equal sign.
   
   The value is specified in a string surrounded by single quotes or a
   string surrounded by double quotes. (See: other tolerated forms @@)
...   




More information about the talk mailing list