rfc:spread_operator_for_array

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:spread_operator_for_array [2019/04/04 13:56] jhdxrrfc:spread_operator_for_array [2019/04/05 06:09] jhdxr
Line 31: Line 31:
 ==== String keys ==== ==== String keys ====
  
-In order to make the behavior consistent with [[rfc:argument_unpacking|argument unpacking]], string keys are not supported.+In order to make the behavior consistent with [[rfc:argument_unpacking|argument unpacking]], string keys are not supported. A recoverable error will be thrown once a string key is encountered.
  
 ==== By-reference passing ==== ==== By-reference passing ====
Line 37: Line 37:
 <code php> <code php>
 $arr1 = [1, 2, 3]; $arr1 = [1, 2, 3];
-$arr2 = [...&$arr1]; //invalid+$arr2 = [...&$arr1]; //invalid syntax
 </code> </code>
  
rfc/spread_operator_for_array.txt · Last modified: 2019/05/13 12:45 by nikic