rfc:unicode_escape

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:unicode_escape [2014/12/08 23:48] – Opened vote ajfrfc:unicode_escape [2014/12/10 19:55] – ' ajf
Line 1: Line 1:
 ====== PHP RFC: Unicode Codepoint Escape Syntax ====== ====== PHP RFC: Unicode Codepoint Escape Syntax ======
-  * Version: 0.1.2+  * Version: 0.1.3
   * Date: 2014-11-24, Last Updated 2014-12-08   * Date: 2014-11-24, Last Updated 2014-12-08
   * Author: Andrea Faulds, ajf@ajf.me   * Author: Andrea Faulds, ajf@ajf.me
Line 78: Line 78:
  
 This change would take place in a major version, so some level of backwards-compatibility breakage would be justified. In cases where it caused problems with existing code, fixing it could be done quite trivially by either switching to single-quoted strings, or escaping the backslash. This change would take place in a major version, so some level of backwards-compatibility breakage would be justified. In cases where it caused problems with existing code, fixing it could be done quite trivially by either switching to single-quoted strings, or escaping the backslash.
 +
 +In order to reduce backwards-compatibility issues, particularly with JSON in string literals, ''\u'' which is not followed by an opening ''{'' will pass through verbatim (instead of being interpreted as an escape sequence) and not raise an error. This means that existing code like ''json_decode("\"\u202e\"");'' will continue to work properly. On the other hand, ''"\u{foobar"'' will raise an error.
  
 ===== Proposed PHP Version(s) ===== ===== Proposed PHP Version(s) =====
Line 127: Line 129:
 ===== Changelog ===== ===== Changelog =====
  
 +  * v0.1.3 - ''\u'' without a following opening ''{'' passes through verbatim
   * v0.1.2 - Ruby support   * v0.1.2 - Ruby support
   * v0.1.1 - Added Future Scope note on named literals   * v0.1.1 - Added Future Scope note on named literals
   * v0.1 - Initial version   * v0.1 - Initial version
rfc/unicode_escape.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1