php-src/ext/spl/tests/iterator_019.phpt
Antony Dovgal e40df39518 fix typos
2006-03-23 14:56:12 +00:00

36 lines
494 B
PHP
Executable File

--TEST--
SPL: NoRewindIterator
--SKIPIF--
<?php if (!extension_loaded("spl")) print "skip"; ?>
--FILE--
<?php
echo "===Current===\n";
$it = new NoRewindIterator(new ArrayIterator(array(0 => 'A', 1 => 'B', 2 => 'C')));
echo $it->key() . '=>' . $it->current() . "\n";
echo "===Next===\n";
$it->next();
echo "===Foreach===\n";
foreach($it as $key=>$val)
{
echo "$key=>$val\n";
}
?>
===DONE===
<?php exit(0); ?>
--EXPECTF--
===Current===
0=>A
===Next===
===Foreach===
1=>B
2=>C
===DONE===