rfc: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
Next revision
Previous revision
rfc:deprecate_php_short_tags [2019/04/09 08:17] girgiasrfc:deprecate_php_short_tags [2019/08/06 17:37] (current) – Change status to obsolete girgias
Line 3: Line 3:
   * Date: 2019-03-20   * Date: 2019-03-20
   * Author: George Peter Banyard, <girgias@php.net>   * Author: George Peter Banyard, <girgias@php.net>
-  * Status: Under Discussion+  * Status: Accepted on 2019-04-24, rendered obsolete by [[rfc:deprecate_php_short_tags_v2|PHP RFC: Deprecate short open tags, again]] on 2019-07-23 
 +  * Target Version: PHP 7.4 
 +  * Implementation: https://github.com/php/php-src/pull/3972
   * First Published at: http://wiki.php.net/rfc/deprecate_php_short_tags   * First Published at: http://wiki.php.net/rfc/deprecate_php_short_tags
  
 ===== Introduction ===== ===== Introduction =====
  
-PHP has provided over the years different ways to indicate the beginning of PHP code other than the standard <php><?php ... ?></php> open tags. Most of these opening tags have been removed with PHP 7.0.0((https://wiki.php.net/rfc/remove_alternative_php_tags|Remove alternative PHP tags RFC)), however, PHP's short open tags still remain.+PHP has provided over the years different ways to indicate the beginning of PHP code other than the standard <php><?php ... ?></php> open tags. Most of these opening tags have been removed with PHP 7.0.0((Remove alternative PHP tags RFC https://wiki.php.net/rfc/remove_alternative_php_tags)), however, PHP's short open tags still remain.
  
 ===== Proposal ===== ===== Proposal =====
-Deprecate and disable <php>short_open_tag</php> in PHP 7.4 and remove PHP short open tags in PHP 8.0.+Deprecate and disable <php>short_open_tag</php> in PHP 7.4 and remove PHP'short open tags in PHP 8.0.
  
 ===== Reasoning ===== ===== Reasoning =====
  
-  * The PHP [[https://secure.php.net/manual/en/language.basic-syntax.phptags.php|documentation]] discourages their usage. +  * The PHP [[https://php.net/manual/en/language.basic-syntax.phptags.php|documentation]] discourages their usage. 
-  * PHP short open tags clash with XML ''<?xml ?>'' and can mean two different things depending on the INI configuration. +  * PHP'short open tags clash with XML ''<?xml ?>'' and can mean two different things depending on the INI configuration. 
-  * PHP short open tags depend on an INI directive and as such are non-portable.+  * PHP'short open tags depend on an INI directive and as such are non-portable.
   * As such source code may leak if PHP relying on the short open tags is executed on a configuration where this isn't enabled.   * As such source code may leak if PHP relying on the short open tags is executed on a configuration where this isn't enabled.
 +  * PHP's parser simplification.
  
 ===== Backward Incompatible Changes ===== ===== Backward Incompatible Changes =====
 Every script which currently uses the discouraged short <php><?</php> open tag will need to convert to the standard <php><?php</php> open tag.\\ Every script which currently uses the discouraged short <php><?</php> open tag will need to convert to the standard <php><?php</php> open tag.\\
-This can be automatically achieved by using the ''"full_opening_tag"'' fixer from [[https://cs.symfony.com/|PHP-CS-Fixer]]+This can be automatically achieved by using the ''"full_opening_tag"'' fixer from [[https://cs.symfony.com/|PHP-CS-Fixer]].
  
 ===== Proposed PHP Version(s) ===== ===== Proposed PHP Version(s) =====
-Deprecation notice and default value changed to Off in PHP 7.4 and removal in PHP 8.0+Deprecation notice and default value changed to Off in PHP 7.4 and removal in PHP 8.0.
  
 ===== RFC Impact ===== ===== RFC Impact =====
Line 38: Line 41:
  
 ==== php.ini Defaults ==== ==== php.ini Defaults ====
-Change <php>short_open_tag</php> from ''"1"'' to ''"0"''+Change <php>short_open_tag</php> from ''"1"'' to ''"0"''.
  
 ===== Unaffected PHP Functionality ===== ===== Unaffected PHP Functionality =====
 The <php><?=</php> short tag is unaffected because as of PHP 5.4 it is always available. The <php><?=</php> short tag is unaffected because as of PHP 5.4 it is always available.
  
 +===== Feedback =====
 +Facebook poll ((https://fb.com/groups/2204685680/permalink/10157687999015681/)) created by Peter Kokot: 73 for, 2 against.
  
 ===== Proposed Voting Choices ===== ===== Proposed Voting Choices =====
Line 49: Line 54:
 ===== Vote ===== ===== Vote =====
 Primary vote: Deprecate PHP's short open tags in PHP 7.4.\\ Primary vote: Deprecate PHP's short open tags in PHP 7.4.\\
-Requires a 2/3 majority+Requires a 2/3 majority.
  
-Secondary vote: Remove PHP's short open tags in PHP 8\\ +Secondary vote: Remove PHP's short open tags in PHP 8.0.\\ 
-Requires a 2/3 majority+Requires a 2/3 majority
 + 
 +Voting started on 2019-04-10 at 10:40 UTC and ran until 2019-04-24 11:20 UTC (for two (2) weeks)
  
 <doodle title="Deprecate PHP short open tags in PHP 7.4?" auth="girgias" voteType="single" closed="true"> <doodle title="Deprecate PHP short open tags in PHP 7.4?" auth="girgias" voteType="single" closed="true">
Line 66: Line 73:
 ===== Patches and Tests ===== ===== Patches and Tests =====
 https://github.com/php/php-src/pull/3972 PHP 7.4 Deprecation Notice Implementation\\ https://github.com/php/php-src/pull/3972 PHP 7.4 Deprecation Notice Implementation\\
-https://github.com/php/php-src/pull/3975 PHP 8 Removal Implementation\\ +https://github.com/php/php-src/pull/3975 PHP 8.0 Removal Implementation\\ 
-TBD Documentation patch+TBD Documentation patch\\
  
 ===== Implementation ===== ===== Implementation =====
Line 78: Line 85:
 ===== References ===== ===== References =====
 [[https://externals.io/message/104662|Initial feedback on Internals (link to External.io)]]\\ [[https://externals.io/message/104662|Initial feedback on Internals (link to External.io)]]\\
-[[https://externals.io/message/104922|RFC Announcement on Internals (link to External.io)]]+[[https://externals.io/message/104922|RFC Announcement on Internals (link to External.io)]]\\ 
 +[[https://externals.io/message/105201|RFC Vote Announcement on Internals (link to External.io)]]\\
rfc/deprecate_php_short_tags.1554797843.txt.gz · Last modified: 2019/04/09 08:17 by girgias