RE: [PHP-DEV] [RFC] [VOTE] Deprecate PHP's short open tags, again
| From: | Reinis Rozitis | Date: | Fri, 09 Aug 2019 12:26:43 +0000 |
| Subject: | RE: [PHP-DEV] [RFC] [VOTE] Deprecate PHP's short open tags, again | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-106485@lists.php.net to get a copy of this message | ||
> This does not explain how someone could use that feature *by accident*. I gave
> an example where you can use short open tags by accident, and it is really easy
> (the most popular IDE sometimes generates code with short open tags) and hard
> to notice (it is not easy to spot a difference between
<?
> and <?php). How can
> you compare this to situation when you create a separate file with an explicit
> directive to disable PHP engine, and then be surprised that code is not executed?
Disabling short tags now is done with "an explicit directive" (there has to be a specific
ini file with a specific setting 'short_open_tag = 0').
Isn't this the same "situation when you create a separate file with an explicit
directive"?
If a coder (or IDE) has written '<?', '<%' or by accident any other tag
unless tested the effect (a part of code not being parsed/executed) will be exactly the same if the
feature suddenly disappeared (unless the additional checks in the 'v2 RFC' which on the
other hand would make the engine a tiny bit slower but probably have to be implemented to avoid such
accidents).
rr