rfc:abstract_syntax_tree

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:abstract_syntax_tree [2014/08/25 16:57] – vote - > accepted nikicrfc:abstract_syntax_tree [2017/09/22 13:28] (current) – external edit 127.0.0.1
Line 2: Line 2:
   * Date: 2014-07-28   * Date: 2014-07-28
   * Author: Nikita Popov <nikic@php.net>   * Author: Nikita Popov <nikic@php.net>
-  * Status: Accepted +  * Status: Implemented (in PHP 7)
-  * Targeting: PHP 7+
   * Discussion: http://markmail.org/message/br4ixewsnqitrx3n   * Discussion: http://markmail.org/message/br4ixewsnqitrx3n
  
Line 96: Line 95:
  
 ==== Changes to list() ==== ==== Changes to list() ====
 +
 +> **Note**: The behavior of ''list($a, $b) = $a'' described below no longer applies. After this RFC was accepted ''list()'' assignments that contain the same variable on the left- and right-hand side have been special cased to ensure the right-hand side always evaluates first. This means that ''list($a, $b) = $a'' continues working as expected.
  
 ''list()'' currently assigns variables right-to-left, the AST implementation will assign them left-to-right instead: ''list()'' currently assigns variables right-to-left, the AST implementation will assign them left-to-right instead:
Line 148: Line 149:
  
 ==== Auto-vivification order for by-reference assignments ==== ==== Auto-vivification order for by-reference assignments ====
 +
 +> **Note**: The auto-vivification order for reference assignments has been restored to the old behavior in PHP 7.1. The reason for this is that we found hard to avoid memory safety issues with the new order.
  
 While by-reference assignments are (CVs notwithstanding) evaluated left-to-right, auto-vivification currently occurs right-to-left. In the AST implementation this will happen left-to-right instead: While by-reference assignments are (CVs notwithstanding) evaluated left-to-right, auto-vivification currently occurs right-to-left. In the AST implementation this will happen left-to-right instead:
rfc/abstract_syntax_tree.1408985860.txt.gz · Last modified: 2017/09/22 13:28 (external edit)