You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Returns a lazy collection of items which are part of the original collection from item number $from to item number $to inclusive. The items before $from are also realized, just not returned.
But its $to param usage is exclusive in the implementation: if ($index >= $from && ($index < $to || $to == -1))
Also, naming an index (starting at zero) as the item number may be a little confusing.
Did I get something wrong, please? If this is an issue, is it a documentation or implementation one? Is it intended to be inclusive or exclusive?
The text was updated successfully, but these errors were encountered:
The docs for the slice function says:
But its
$to
param usage is exclusive in the implementation:if ($index >= $from && ($index < $to || $to == -1))
Also, naming an index (starting at zero) as the item number may be a little confusing.
Did I get something wrong, please? If this is an issue, is it a documentation or implementation one? Is it intended to be inclusive or exclusive?
The text was updated successfully, but these errors were encountered: