array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'uk', ), 'this' => array ( 0 => 'norewinditerator.rewind.php', 1 => 'NoRewindIterator::rewind', 2 => 'Prevents the rewind operation on the inner iterator', ), 'up' => array ( 0 => 'class.norewinditerator.php', 1 => 'NoRewindIterator', ), 'prev' => array ( 0 => 'norewinditerator.next.php', 1 => 'NoRewindIterator::next', ), 'next' => array ( 0 => 'norewinditerator.valid.php', 1 => 'NoRewindIterator::valid', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/spl/norewinditerator/rewind.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>
(PHP 5 >= 5.1.0, PHP 7, PHP 8)
NoRewindIterator::rewind — Prevents the rewind operation on the inner iterator
У цієї функції немає параметрів.
Не повертає значень.
Приклад #1 NoRewindIterator::rewind() example
This example demonstrates that calling rewind on a NoRewindIterator object has no effect.
<?php
$fruits = array("lemon", "orange", "apple", "pear");
$noRewindIterator = new NoRewindIterator(new ArrayIterator($fruits));
echo $noRewindIterator->current() . "\n";
$noRewindIterator->next();
// now rewind the iterator (nothing should happen)
$noRewindIterator->rewind();
echo $noRewindIterator->current() . "\n";
?>
Поданий вище приклад виведе:
lemon orange