Re: PHP code only allowed in XHTML 5?

Daniel Glazman On 09-07-22 10.47:

> Toby A Inkster wrote:
> 
>> <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.
> 
> They are real processing instructions and the current PHP start marker
> <?php was not the one early versions of PHP used.


OK - may be maybe I agreed too soon with Toby on exactly this 
point. ;-)

> It was changed to
> match SGML/XML PIs to allow editability in markup editors and wysiwyg
> editors.

Thanks for confirming how I suspected that this syntax was chosen!

> Breaking that compatibility is, IMHO, a serious error.


Indeed.
-- 
leif halvard silil

Received on Wednesday, 22 July 2009 09:39:30 UTC