Documentation

InfiniteArrayIterator
in package

Convenience wrapper for cyclically iterating over an array.

Is optimized for direct access (rather than with foreach).

Tags
template
template

Table of Contents

Properties

$iter  : InfiniteIterator<V, ArrayIterator<K, V>>

Methods

__construct()  : mixed
current()  : V
getAndAdvance()  : V
Get the current element and then advance the iterator
next()  : void

Properties

Methods

__construct()

public __construct(array<string|int, mixed> $arr) : mixed
Parameters
$arr : array<string|int, mixed>

getAndAdvance()

Get the current element and then advance the iterator

public getAndAdvance() : V
Return values
V

        
On this page

Search results