Returns

Implementation of

Checks whether the given element is contained in the collection. Only element
values are compared, not keys. The comparison of two elements is strict, that
means not only the value but also the type must match. For objects this means
reference equality.

Checks whether the given element is contained in the collection. Only element
values are compared, not keys. The comparison of two elements is strict, that
means not only the value but also the type must match. For objects this means
reference equality.

Parameters

$element

Returns

booleanTRUE if the given element is contained in the collection, FALSE otherwise.

Returns

Implementation of

Searches for a given element and, if found, returns the corresponding
key/index of that element. The comparison of two elements is strict, that means
not only the value but also the type must match. For objects this means
reference equality.

Searches for a given element and, if found, returns the corresponding
key/index of that element. The comparison of two elements is strict, that means
not only the value but also the type must match. For objects this means
reference equality.

Parameters

$element

The element to search for.

Returns

mixedThe key/index of the element or FALSE if the element was not found.

Parameters

Returns

Implementation of

Partitions this collection in two collections according to a predicate. Keys
are preserved in the resulting collections.

Partitions this collection in two collections according to a predicate. Keys
are preserved in the resulting collections.

Parameters

$p

The predicate on which to partition.

Returns

arrayAn array with two elements. The first element contains the collection of
elements where the predicate returned TRUE, the second element contains the
collection of elements where the predicate returned FALSE.

Returns

Implementation of

Extract a slice of $length elements starting at position $offset from the
Collection.

Extract a slice of $length elements starting at position $offset from the
Collection.

If $length is null it returns all elements from $offset to the end of the
Collection. Keys have to be preserved by this method. Calling this method will
only return the selected slice and NOT change the elements contained in the
collection slice is called on.