rfc:counterargument:deprecate_php_short_tags

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Last revisionBoth sides next revision
rfc:counterargument:deprecate_php_short_tags [2019/08/05 23:03] zeevrfc:counterargument:deprecate_php_short_tags [2019/08/05 23:08] – Add another reason to keep short tags zeev
Line 55: Line 55:
 ==== The Case For Keeping Short Tags ==== ==== The Case For Keeping Short Tags ====
  
-There are two main reasons for keeping short tags.+There are four main reasons for keeping short tags.
  
 === Reason #1:  There's no reason to remove them === === Reason #1:  There's no reason to remove them ===
Line 63: Line 63:
 As the saying goes - "if ain't broke - don't fix it". As the saying goes - "if ain't broke - don't fix it".
  
-=== Reason #2:  Removing short tags would bring needless headache to our users ===+=== Reason #2:  Short tags are de-facto opt-in === 
 + 
 +Even though short tags are enabled by default in most PHP binaries - in practice, they are disabled by default via configuration in virtually all mainstream PHP distributions.  This includes PHP in all mainstream Linux distros, XAMPP, macOS - and any distribution that uses one of the recommended INI files.  This means that in practice, users who want to use short tags need to take a concrete step to enable them - making it a lot less likely that they would be using them unintentionally in code that is meant to be portable. 
 + 
 +=== Reason #3:  Removing short tags would bring needless headache to our users ===
  
 For users of short tags, deprecating that syntax gives them a 100.0% needless headache.  As illustrated above - these are not people who care about portability, or they would have figured out by now that they shouldn't be using that syntax.  It's not that now that short tags are no longer available - they would suddenly start distributing their code, just because it can theoretically run on any server out there. For users of short tags, deprecating that syntax gives them a 100.0% needless headache.  As illustrated above - these are not people who care about portability, or they would have figured out by now that they shouldn't be using that syntax.  It's not that now that short tags are no longer available - they would suddenly start distributing their code, just because it can theoretically run on any server out there.
Line 69: Line 73:
 Put yourself in the shoes of a user or company that has been using short tags for their internal projects for the last decade, and are now forced to spend time and money in order to run be able to run your app on PHP 8 - for **absolutely no gain**.  What do we tell them when they ask why we did it?  "We changed our mind after 20 years even though the case against it is weaker?"  There's simply no good answer. Put yourself in the shoes of a user or company that has been using short tags for their internal projects for the last decade, and are now forced to spend time and money in order to run be able to run your app on PHP 8 - for **absolutely no gain**.  What do we tell them when they ask why we did it?  "We changed our mind after 20 years even though the case against it is weaker?"  There's simply no good answer.
  
-=== Reason #3:  Removing short tags would slow down migration to newer versions of PHP ===+=== Reason #4:  Removing short tags would slow down migration to newer versions of PHP ===
  
 PHP, like many other packages and languages - suffers from a long tail of users that are running on older versions for a variety of reasons.  One of the key reasons is the complexity of upgrading.  With this deprecation - we're making it more difficult for users to stay current, for no gain.  As it is well within the consensus that it is our interest for users to upgrade as quickly as possible to newer versions (if only for security reasons) - breaking compatibility in such a wide scale for no gain is a bad bargain. PHP, like many other packages and languages - suffers from a long tail of users that are running on older versions for a variety of reasons.  One of the key reasons is the complexity of upgrading.  With this deprecation - we're making it more difficult for users to stay current, for no gain.  As it is well within the consensus that it is our interest for users to upgrade as quickly as possible to newer versions (if only for security reasons) - breaking compatibility in such a wide scale for no gain is a bad bargain.
rfc/counterargument/deprecate_php_short_tags.txt · Last modified: 2019/08/05 23:09 by zeev