W3C home > Mailing lists > Public > public-html@w3.org > July 2009

Re: PHP code only allowed in XHTML 5?

From: Leif Halvard Silli <lhs@malform.no>
Date: Wed, 22 Jul 2009 11:08:56 +0200
Message-ID: <4A66D728.3030108@malform.no>
To: Toby A Inkster <tai@g5n.co.uk>
CC: HTMLWG <public-html@w3.org>
Toby A Inkster On 09-07-22 10.33:

> On 22 Jul 2009, at 02:07, Leif Halvard Silli wrote:
> 
>> Suppose one wants to validate a page that embeds PHP, but that one 
>> wants to do so /prior/ to the execution of the PHP script:
>>
>>        <?php Print "Hello, World!"; ?>
>>
>> Validator.nu will then tell you that the page is _invalid_ as a HTML5 
>> page. But that it is valid as a XHTML5 page ... Also, checking the 
>> HTML 5 draft, you will find nothing about the <?> syntax.
> 
> 
> <p class="<?php echo 'foo';?>">
> 
> Invalid in both XHTML and HTML, but perfectly legal PHP.


No one has has claimed that _any_ PHP should be valid HTML. But 
regardless, according to Validator.w3.org, the above is actually 
perfectly legal HTML. But illegal XHTML.

> PHP's start and 
> end markers are not real XML processing instructions. They just look a 
> bit like them.


This was already evident from my message.
-- 
leif halvard silli
Received on Wednesday, 22 July 2009 09:09:39 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:15:48 UTC