rfc:remove_alternative_php_tags

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
rfc:remove_alternative_php_tags [2014/09/10 10:05]
nikic
rfc:remove_alternative_php_tags [2017/09/22 13:28] (current)
Line 2: Line 2:
   * Date: 2014-09-09   * Date: 2014-09-09
   * Author: Nikita Popov <nikic@php.net>   * Author: Nikita Popov <nikic@php.net>
-  * Status: Under Discussion+  * Status: Accepted
   * Targeting: PHP 7   * Targeting: PHP 7
   * Patch: https://github.com/php/php-src/pull/813   * Patch: https://github.com/php/php-src/pull/813
Line 20: Line 20:
 The listed opening tags will no longer enter PHP mode and the listed closing tags will no longer leave PHP mode. The listed opening tags will no longer enter PHP mode and the listed closing tags will no longer leave PHP mode.
  
-Additionally the ''asp_tags'' ini directive is removed.+Additionally the ''asp_tags'' ini directive is removed. Trying to enable ''asp_tags'' will result in a core error.
  
 This RFC does //**not**// remove short opening tags (''<?'') or short opening tags with echo (''<?=''). This RFC does //**not**// remove short opening tags (''<?'') or short opening tags with echo (''<?='').
Line 30: Line 30:
   * ASP tags [[http://stackoverflow.com/questions/14694116/how-to-disable-asp-style-php-tags-within-a-specific-file|clash with underscore.js templates]] and it's not possible to disable asp tags using ''ini_set()''.   * ASP tags [[http://stackoverflow.com/questions/14694116/how-to-disable-asp-style-php-tags-within-a-specific-file|clash with underscore.js templates]] and it's not possible to disable asp tags using ''ini_set()''.
   * Supporting different tags allows very weird mixing like ''%%<script language=php> echo "foo" %>%%''   * Supporting different tags allows very weird mixing like ''%%<script language=php> echo "foo" %>%%''
 +
 +===== Porting tool =====
 +
 +To simplify porting of legacy code using the alternative tags, a [[https://gist.github.com/nikic/74769d74dad8b9ef221b|porting script]] is provided. The script takes a directory and will replace ASP and script tags in all ''.php'' files contained in this directory:
 +
 +<code>
 +php -d asp_tags=1 portAlternativeTags.php dir/
 +</code>
  
 ===== Vote ===== ===== Vote =====
  
-As this is a language change a 2/3 majority is required.+The vote started on 2014-09-24 and ended on 2014-10-01. The required 2/3 majority has been reached, as such this RFC is accepted. 
 + 
 +<doodle title="Remove alternative PHP tags in PHP 7?" auth="nikic" voteType="single" closed="true"> 
 +   * Yes 
 +   * No 
 +</doodle>
rfc/remove_alternative_php_tags.1410343542.txt.gz · Last modified: 2017/09/22 13:28 (external edit)