rfc:concatenation_precedence

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:concatenation_precedence [2019/03/28 22:57] bwoebirfc:concatenation_precedence [2020/08/01 23:54] (current) – RFC was implemented carusogabriel
Line 3: Line 3:
   * Date: 2019-03-28   * Date: 2019-03-28
   * Author: Bob Weinand, bobwei9@hotmail.com   * Author: Bob Weinand, bobwei9@hotmail.com
-  * Status: Under discussion+  * Status: Implemented
   * First Published at: http://wiki.php.net/rfc/concatenation_precedence   * First Published at: http://wiki.php.net/rfc/concatenation_precedence
  
Line 32: Line 32:
 ===== Backward Incompatible Changes ===== ===== Backward Incompatible Changes =====
  
-Every unparenthesized expression featuring an '-' or '+' after a '.' will change behavior. As an example, the expression <php>"3" . "5" + 7</php> will now be equal to 312 instead of previously 42.+Every unparenthesized expression featuring an '-' or '+' after a '.' will change behavior. As an example, the expression <php>"3" . "5" + 7</php> will now be equal to "312instead of previously 42.
  
 While this is a subtle behavior change in that it will give different outputs without notice or warning, it is trivially possible to statically analyze the code and find all instances where this happens. As to my knowledge these occurrences are quite rare as it almost always is an error in the current form, rendering the impact minimal. While this is a subtle behavior change in that it will give different outputs without notice or warning, it is trivially possible to statically analyze the code and find all instances where this happens. As to my knowledge these occurrences are quite rare as it almost always is an error in the current form, rendering the impact minimal.
 +
 +As Nikita mentioned on the mailing list: http://news.php.net/php.internals/105442 - the impact to existing open-source code is de facto invisible; all found occurrences are actual bugs. This is a strong indicator that the overall impact will also be very minimal.
  
 ===== Proposed PHP Version(s) ===== ===== Proposed PHP Version(s) =====
Line 40: Line 42:
 PHP 8, with a deprecation notice in PHP 7.4 upon encountering an unparenthesized expression containing an '.' before a '+' or '-' PHP 8, with a deprecation notice in PHP 7.4 upon encountering an unparenthesized expression containing an '.' before a '+' or '-'
  
-===== Proposed Voting Choices =====+===== Vote ===== 
 + 
 +Voting started 2019-04-30 and ends 2019-05-14. The first (primary) voting requires a 2/3 majority. The second (secondary) voting requires a 50%+1 majority.
  
-Primary vote (2/3 majority): "Change the precedence in PHP 8""No"+<doodle title="Change the precedence of the concatenation operator as proposed in PHP 8?auth="bwoebivoteType="single" closed="true"> 
 +   * Yes 
 +   * No 
 +</doodle>
  
-Secondary vote (simple majority): "Emit a deprecation notice in PHP 7.4 if the RFC is accepted""No deprecation notice"+<doodle title="Emit a deprecation notice in PHP 7.4 if the RFC is accepted?auth="bwoebivoteType="single" closed="true"> 
 +   * Yes 
 +   * No 
 +</doodle>
  
 ===== Patch ===== ===== Patch =====
rfc/concatenation_precedence.1553813830.txt.gz · Last modified: 2019/03/28 22:57 by bwoebi