Ilia A. wrote:
> Since the general consensus by the developers is not to remove the short_tags 
> or even disable them. Perhaps we should consider alternate solutions to this 
> problem. Given the buzzword popularity of XML and its slowly growing 
> popularity among website designers (XHTML) this issue is likely to come up in 
> the future yet again.
> The solution I would like to offer, is a patch that adds special handling for 
> <?xml. Thus preventing the language parser from attempting to parse data 
> inside <?xml as PHP source.

I think it's reasonable patch, but "<?" is XML Processing Instruction
tag...

We never know how many processing tags will be in the future.
We don't know if there will be xml processor that processes php
tag or not.

Therefore, user should turn short tag off by themselves
if the want to use XML, or echo "<?xml ......>" at the beginning
of output.

IMO, disabling short tag in php.ini-recommended is ok in the
future. I know Zeev don't like it and I understand the reasoning. :)

Isn't BIG caution for short_open_tag=Off while having short_open_tag=On
enough for now? Something like;

==========
;If you are willing to process XML file with PHP, you should
;turn short tag off or echo XML processing tag, "<?" whenever
;needed. Turning off this directive and use of "<?php" is generally
;recommended with XML documents.
;
;!!CAUTION!! If you have a script start with short tag and "short_open_tag=Off",
; "<?", the content(source) is displayed!! In future version of
;php.ini-recommended will have short_open_tag=Off by default! Use of short
;open tag is discouraged.
;
;NOTE: Authors writing portable scripts should check this ini setting.
;or echo "<?".

short_open_tag=On

==========

--
Yasuo Ohgaki


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to