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

Re: PHP code only allowed in XHTML 5?

From: Toby A Inkster <tai@g5n.co.uk>
Date: Wed, 22 Jul 2009 09:33:06 +0100
Message-Id: <4254106E-A10B-4369-8E25-923DB385A268@g5n.co.uk>
Cc: HTMLWG <public-html@w3.org>
To: Leif Halvard Silli <lhs@malform.no>
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. PHP's start  
and end markers are not real XML processing instructions. They just  
look a bit like them.

-- 
Toby A Inkster
<mailto:mail@tobyinkster.co.uk>
<http://tobyinkster.co.uk>
Received on Wednesday, 22 July 2009 08:32:00 UTC

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