Re: [RFC] [VOTE] Deprecate PHP's short open tags, again
| From: | Nikita Popov | Date: | Wed, 07 Aug 2019 08:11:20 +0000 |
| Subject: | Re: [RFC] [VOTE] Deprecate PHP's short open tags, again | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-106404@lists.php.net to get a copy of this message | ||
On Tue, Aug 6, 2019 at 11:55 PM Claude Pache <claude.pache@gmail.com> wrote:
>
>
> > Le 6 août 2019 à 20:46, Nikita Popov <nikita.ppv@gmail.com> a écrit :
> >
> > On Tue, Aug 6, 2019 at 1:34 PM G. P. B. <george.banyard@gmail.com>
> wrote:
> >
> >> The voting for the "Deprecate short open tags, again" [1] RFC has begun.
> >> It is expected to last two (2) weeks until 2019-08-20.
> >>
> >> A counter argument to this RFC is available at
> >>
> >> https://wiki.php.net/rfc/counterargument/deprecate_php_short_tags
> >>
> >> Best regards
> >>
> >> George P. Banyard
> >>
> >> [1]
> >> https://wiki.php.net/rfc/deprecate_php_short_tags_v2
> >>
> >
> > Side-note: Even if this RFC fails, we should probably still make it an
> > error to use <? without short_tags being **explicitly** enabled, so that
> we
> > may flip the default to off at some later point in time. The current
> > default being "on" despite their use being discouraged is half the
> trouble.
> >
> > Nikita
>
>
> That would mean in particular that XML documents could no longer be
> preprocessed by PHP without boilerplate around its
<?xml
> ?> declaration..
> I doubt that this is a more acceptable breaking change than deprecating
> short_tags.
To clarify: What I had in mind is that use of <? results in an error if and
only if short_tags is left at its default value (of On). If short_tags is
explicitly Off or explicitly On, everything works as usual. Embedding <?xml
?> in PHP code requires an explicit short_tags=Off right now, so the
situation there shouldn't change, unless I'm missing something.
The only motivation here is to allow us to change the default to
short_tags=Off at some point in the future (say PHP 9), after enough time
has passed where short_tags cannot be used by default, without explicitly
being enabled. We can't just flip the default right now due to the usual
code leaking concerns.
Regards,
Nikita