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 revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
rfc:remove_alternative_php_tags [2014/09/09 22:05] nikicrfc:remove_alternative_php_tags [2014/09/12 17:45] nikic
Line 13: Line 13:
  
   * ''<%'' opening tag   * ''<%'' opening tag
-  * ''<%='' short opening tag+  * ''<%='' opening tag with echo
   * ''%>'' closing tag   * ''%>'' closing tag
   * ''%%(<script\s+language\s*=\s*(php|"php"|'php')\s*>)i%%'' opening tag   * ''%%(<script\s+language\s*=\s*(php|"php"|'php')\s*>)i%%'' opening tag
Line 21: Line 21:
  
 Additionally the ''asp_tags'' ini directive is removed. Additionally the ''asp_tags'' ini directive is removed.
 +
 +This RFC does //**not**// remove short opening tags (''<?'') or short opening tags with echo (''<?='').
  
 ===== Reasoning ===== ===== Reasoning =====
Line 28: 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. As this is a language change a 2/3 majority is required.
rfc/remove_alternative_php_tags.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1