Larry Garfield wrote:
> Disable short tags.
> 
> If short tags are enabled, the PHP parser sees the <? and switches into PHP 
> mode.  It then starts parsing the "xml" and sees that it's not proper PHP, 
> and freaks out.  
> 
> You can:
> 
> a) Use PHP to print out the XML declaration as a string:
> <?php print '<?xml version="1.0" encoding="utf-8"?>'; ?>
> 
> b) Disable short tags so that the PHP parser ignores <? and only recognizes 
> <?php.
> 
> The correct answer is (b).  (PHP 6 won't even have short tags, so get used to 
> not having them.)
> 

Can you find anywhere where this was announced?  I don't recall seeing
any decision on it.

A quick search found several mentions of the devs deciding to keep short
tags when going from php 4 to php 5.  The php 6 todo list shows that <%
will be removed but <? will stay.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to