rfc:functionarraydereferencing

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:functionarraydereferencing [2010/06/08 10:52] – Update feliperfc:functionarraydereferencing [2011/04/06 10:59] – external edit 127.0.0.1
Line 5: Line 5:
   * Date: June 07, 2010 (re-opened)   * Date: June 07, 2010 (re-opened)
   * Author: Philip Olson <philip@php.net>, Felipe Pena <felipe@php.net>   * Author: Philip Olson <philip@php.net>, Felipe Pena <felipe@php.net>
-  * Status: Open+  * Status: Accepted
  
 ===== Introduction ===== ===== Introduction =====
Line 49: Line 49:
 <code php> <code php>
 <?php <?php
- 
 function &foo(&$foo) { function &foo(&$foo) {
  return $foo;  return $foo;
 } }
 + 
 $a = array(1); $a = array(1);
-foo($a)[0] = 2; +$b = foo($a)[0]
-var_dump($a); // array(1) {  [0]=>  int(2) }+$b = 2; 
 +var_dump($b); // array(1) {  [0]=>  int(2) }
  
 ?> ?>
Line 92: Line 92:
   * November 9, 2006: http://markmail.org/message/5bv6mtd7zorni7gc   * November 9, 2006: http://markmail.org/message/5bv6mtd7zorni7gc
   * June 3, 2010: http://markmail.org/message/3ancnjwqhax47n2j   * June 3, 2010: http://markmail.org/message/3ancnjwqhax47n2j
-  +  * June 7, 2010: http://markmail.org/message/unplu5x3gjjjydwz [Patch proposal]
rfc/functionarraydereferencing.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1