rfc:spread_operator_for_array
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
rfc:spread_operator_for_array [2019/04/04 13:55] – v0.2 jhdxr | rfc: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: | + | In order to make the behavior consistent with [[rfc: |
==== By-reference passing ==== | ==== By-reference passing ==== | ||
Line 37: | Line 37: | ||
<code php> | <code php> | ||
$arr1 = [1, 2, 3]; | $arr1 = [1, 2, 3]; | ||
- | $arr2 = [...& | + | $arr2 = [...& |
</ | </ | ||
Line 68: | Line 68: | ||
- '' | - '' | ||
- | ==== '' | + | ==== ... should be preserved for other use (e.g. map concat) ==== |
This is kind of out of scope here to discuss other concat / merge operation. The important thing is we should make the behavior of same operator consistent and not to confuse userland developer. It's also why I changed the behavior for string keys in this revised version. | This is kind of out of scope here to discuss other concat / merge operation. The important thing is we should make the behavior of same operator consistent and not to confuse userland developer. It's also why I changed the behavior for string keys in this revised version. | ||
rfc/spread_operator_for_array.txt · Last modified: 2019/05/13 12:45 by nikic