Re: RFC - Array slice syntactic sugar
| From: | Alex Bowers | Date: | Fri, 20 Mar 2015 16:00:05 +0000 |
| Subject: | Re: RFC - Array slice syntactic sugar | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-85300@lists.php.net to get a copy of this message | ||
>
> IMHO, stick to offsets in the first instance, this is a slice notation,
> first order of business is to make it behave like array_slice (+on
> strings). Assoc key based slicing feels pretty wrong to me at this point.
I have to agree, we are getting ahead of ourselves.
A quick summary of what this RFC should cover:
- Slicing an array or string based on the positional index.
Things for future RFC consideration:
- Slicing an array or string based on the key.
- Index -1 for last item of list.
Everybody agree that the only focus of this RFC should be the positional
index slicing?