Re: PHP code only allowed in XHTML 5?

On Wed, 22 Jul 2009 12:42:01 +0200, Leif Halvard Silli <lhs@malform.no> wrote:
> Thomas Broyer On 09-07-22 12.03:
>> on at least Firefox and Opera: try it with <?php echo "hello
>> <b>world</b>!"; ?>)
>
> So it ends with the ">" in "<b>". Where is the news? UAs support the  
> SGML/HTML PI syntax - that is why it works like this - and it is also in  
> accordance with how the W3 validator sees it.

I guess the news is that the above example would work in XML.

I agree with Simon that if you want stuff like this to work dedicated editor support is needed (and there is to some extent) and potentially modified validators. This does not e.g. work for Python and also does not work in common PHP scenarios such as

  <div<?php if($foo) { echo " class='bar'"; }?>>

et cetera.


-- 
Anne van Kesteren
http://annevankesteren.nl/

Received on Wednesday, 22 July 2009 10:54:04 UTC