php8.5
Home/ Manual/ spl / multipleiterator/ MultipleIterator::attachIterator

MultipleIterator::attachIterator

PHP function Edit on GitHub ✎

(PHP 5 >= 5.3.0, PHP 7, PHP 8)

Attaches iterator information

Description

MultipleIterator::attachIterator(Iterator $iterator, string|int|null $info = null): void

Attaches iterator information.

Func

Parameters

iterator

The new iterator to attach.

info

The associative information for the Iterator, which must be an int, a string, or null.

Return Values

Description...

Errors/Exceptions

An IllegalValueException if the iterator parameter is invalid, or if info is already associated information.

See Also

  • MultipleIterator::__construct

Source: reference/spl/multipleiterator/attachiterator.xml · from the official PHP manual (php/doc-en)