Re: Re: Is it true that short_open_tag is deprecated in PHP 6?
| From: | Kalle Sommer Nielsen | Date: | Mon, 13 Apr 2009 18:24:02 +0000 |
| Subject: | Re: Re: Is it true that short_open_tag is deprecated in PHP 6? | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-43679@lists.php.net to get a copy of this message | ||
2009/4/13 Jeremy <jeremy@pinacol.com>:
> Glen wrote:
>>
>> It's short, and it doesn't conflict with XML.
>>
>
> I have to say, I don't understand all the hate on short_open_tag. So what
> if it "conflicts" with XML? PHP is not XML. If you use an XML construct in
> your PHP, escape it. PHP can generate a lot of other languages, too --
> should every construct from these languages be forbidden in PHP as well?
Thats because with short_open_tags on, you need to use:
<?php echo('<?xml ... ?>'); ?>
to print the XML declaring, with short open tags, the xml part is
considered a piece of code, which causes a syntax error
>
> Jeremy
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Kalle Sommer Nielsen
kalle@php.net