Re: Allow Iterator to be used with current, next, reset, key functions
| From: | Fleshgrinder | Date: | Sun, 30 Oct 2016 19:08:20 +0000 |
| Subject: | Re: Allow Iterator to be used with current, next, reset, key functions | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-96658@lists.php.net to get a copy of this message | ||
On 10/30/2016 4:08 PM, Rasmus Schultz wrote:
> But either way, I think I'm changing my mind about this one.
>
> And if the these functions support only arrays, then also the names
> should probably be array_first() and array_last() for consistency with
> other array-only functions.
>
> Perhaps better to make people be explicit, rather than trying to hide
> side-effects to achieve shorter syntax...
>
+1
All of these concerns might be hypothetical but I see so much abuse
every day that I prefer to be super conservative rather than trusting
people to do the right thing.
--
Richard "Fleshgrinder" Fussenegger