Re: Throwing an E_DEPRECATED for short_open_tag
| From: | Raphael Geissert | Date: | Wed, 13 Jan 2010 17:06:56 +0000 |
| Subject: | Re: Throwing an E_DEPRECATED for short_open_tag | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-46707@lists.php.net to get a copy of this message | ||
Rasmus Lerdorf wrote:
> Raphael Geissert wrote:
>> However, we would like to contribute in the quest to make applications
>> stop using short_open_tag. To do so, we have decided to throw an
>> E_DEPRECATED warning when an application makes use of short_open_tag. The
>> current implementation can be found at [1].
>>
>> How does this sound?
>
> We have no plans to deprecate the short open tag. So throwing an
> E_DEPRECATED would not be appropriate.
>
True. An idea I just had was to continue throwing E_DEPRECATED (or a warning
with a most appropriate name, if one is added) iff short tags are used
without explicitly enabling them at runtime.
I haven't looked at how the short_open_tag runtime switch was implemented so
I don't know if it's possible or not.
This would for example make the following code throw a warning:
foo.php
<?
// ...
?>
But not this one:
bar.php
<?php
// ...
include("./foo.php");
?>
Does that sound more reasonable? or do you have another idea?
Cheers,
--
Raphael Geissert - Debian Developer
www.debian.org - get.debian.net