PHP 8.4.0 RC4 available for testing

AppendIterator::append

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

AppendIterator::appendAppends an iterator

Descrizione

public AppendIterator::append(Iterator $iterator): void

Appends an iterator.

Elenco dei parametri

iterator

The iterator to append.

Valori restituiti

Nessun valore viene restituito.

Esempi

Example #1 AppendIterator::append() example

<?php
$array_a
= new ArrayIterator(array('a', 'b', 'c'));
$array_b = new ArrayIterator(array('d', 'e', 'f'));

$iterator = new AppendIterator;
$iterator->append($array_a);
$iterator->append($array_b);

foreach (
$iterator as $current) {
echo
$current;
}
?>

Il precedente esempio visualizzerà:

abcdef

Vedere anche:

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top