rfc:octal.overload-checking

Differences

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

Link to this comparison view

Next revision
Previous revision
rfc:octal.overload-checking [2016/04/13 02:36]
pollita created
rfc:octal.overload-checking [2017/09/22 13:28] (current)
Line 1: Line 1:
 ====== PHP RFC: Fix overflow in octal parsing ====== ====== PHP RFC: Fix overflow in octal parsing ======
-  * Version: 1.0+  * Version: 1.1
   * Date: 2016-04-12   * Date: 2016-04-12
   * Author: Sara Golemon <pollita@php.net>   * Author: Sara Golemon <pollita@php.net>
-  * Status: Under Discussion+  * Status: Implemented
   * First Published at: https://wiki.php.net/rfc/octal.overload-checking   * First Published at: https://wiki.php.net/rfc/octal.overload-checking
  
Line 15: Line 15:
  
   - Do nothing.  Some terrible application is relying on this behavior and there's no burning need to fix it.   - Do nothing.  Some terrible application is relying on this behavior and there's no burning need to fix it.
-  - Retain the current overflow behavior, but raise a compile-time warning "Octal escape sequence overflows value of {} truncated to {}"+  - Retain the current overflow behavior, but raise a compile-time warning "Octal escape sequence overflow {} is greater than \\377"
   - Limit octal numbers to \\[0-3]?[0-7]{0,2} meaning that sequences like "\456" would be parsed as octal 45 (decimal 37, e.g. a '%' character) followed by a literal 6   - Limit octal numbers to \\[0-3]?[0-7]{0,2} meaning that sequences like "\456" would be parsed as octal 45 (decimal 37, e.g. a '%' character) followed by a literal 6
  
 Options 2 and 3 may involve a deprecation/warning period followed by a permanent change. Options 2 and 3 may involve a deprecation/warning period followed by a permanent change.
 +
 +**Update:** Between minimal comment and a lack of severity of this case.  I've opted to initiate a vote for option 2.  Produce a compile-time warning about value overflow.
  
 ===== Backward Incompatible Changes ===== ===== Backward Incompatible Changes =====
-Any fix for this overflow behavior means a BC break, by definition.  Thus the RFC.+ 
 +New compile-time warning is raised on overflow during interpolation.
  
 ===== Proposed PHP Version(s) ===== ===== Proposed PHP Version(s) =====
 7.1 7.1
  
-===== Proposed Voting Choices ===== +===== Vote ===== 
-Following a discussion period, a multi option vote will be opened for the above options (mas o menos).  Likely requiring a 2/3rd + 1 majority.+ 
 +Required 50% + 1 
 +\\ Opened: 2016-04-29 21:30 UTC 
 +\\ Closed: 2016-05-13 23:59 UTC 
 + 
 +<doodle title="Raise warning on octal interpolation overflow?" auth="pollita" voteType="single" closed="true"> 
 +   * Yes 
 +   * No 
 +</doodle>
  
 ===== References ===== ===== References =====
 +
 +Implementation: https://github.com/php/php-src/commit/95af467d8def3f3453670340f4e65ce7c189d4f6
  
 The subject of this RFC is [[https://bugs.php.net/bug.php?id=71994|Bug#71994]] The subject of this RFC is [[https://bugs.php.net/bug.php?id=71994|Bug#71994]]
  
rfc/octal.overload-checking.1460514996.txt.gz · Last modified: 2017/09/22 13:28 (external edit)