Re: [RFC] [VOTE] Deprecate PHP's short open tags, again
| From: | Rowan Collins | Date: | Wed, 07 Aug 2019 13:12:07 +0000 |
| Subject: | Re: [RFC] [VOTE] Deprecate PHP's short open tags, again | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-106408@lists.php.net to get a copy of this message | ||
On 07/08/2019 09:11, Nikita Popov wrote:
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.Since it would behave differently, it wouldn't make sense to say that it defaulted to "On", but that actually leads to an interesting feature: add an "error" mode to that setting. So the options would be: - error: any use of "<?" other than "<?php" and "<?=" would raise an error; compile-time default - off: "<?" is ignored and passed through to output; ini default shipped by most packages - on: "<?" is equivalent to "<?php"; no longer any kind of default We could either leave the recommended ini setting in the official distribution as "off" (more compatible) or set it to "error" (to make mistakes safer and easier to spot). Regards. -- Rowan Collins [IMSoP]