Iterator
class Iterator extends ArrayIterator (View source)
Constants
STD_PROP_LIST |
|
ARRAY_AS_PROPS |
|
Methods
__construct(array $array = [], int $flags = 0, $iterator_class = null)
Construct an ArrayIterator
from
ArrayIterator
Details
__construct(array $array = [], int $flags = 0, $iterator_class = null)
Construct an ArrayIterator
bool
offsetExists(string $key)
Check if offset exists
mixed
offsetGet(string $key)
Get value for an offset
void
offsetSet(string $key, TValue $value)
Set value for an offset
void
offsetUnset(string $key)
Unset value for an offset
void
append(mixed $value)
Append an element
array
getArrayCopy()
Get array copy
int
count()
Count elements
int
getFlags()
Get flags
void
setFlags(string $flags)
Set behaviour flags
asort(int $flags = SORT_REGULAR)
Sort array by values
ksort(int $flags = SORT_REGULAR)
Sort array by keys
uasort(callable $callback)
User defined sort
uksort(callable $callback)
User defined sort
natsort()
Sort an array naturally
natcasesort()
Sort an array naturally, case insensitive
void
unserialize(string $data)
Unserialize
string|null
serialize()
Serialize
void
rewind()
Rewind array back to the start
mixed
current()
Return current array entry
mixed
key()
Return current array key
void
next()
Move to next entry
bool
valid()
Check whether array contains more entries
void
seek(int $offset)
Seek to position
array
__debugInfo()
Since: 7.4
No description
array
__serialize()
Since: 7.4
No description
void
__unserialize(array $data)
Since: 7.4
No description