Re: RFC - Array slice syntactic sugar
| From: | Leigh | Date: | Fri, 20 Mar 2015 12:37:10 +0000 |
| Subject: | Re: RFC - Array slice syntactic sugar | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-85282@lists.php.net to get a copy of this message | ||
On Mar 20, 2015 12:33 PM, "Alex Bowers" <bowersbros@gmail.com> wrote:
>
> We also need to consider then the possibility of setting data by position.
>
> What should $array[@1:3] = [1,2,3] do?
>
> Should it overwrite the values there, and append any that don't exist, or
> should it be a parse error?
I'd say overwrite/replace the range with the new value.