mirror of
https://github.com/php/php-src.git
synced 2024-12-05 07:46:06 +08:00
b9470609ad
- Implement AppendIterator in C
34 lines
430 B
PHP
Executable File
34 lines
430 B
PHP
Executable File
--TEST--
|
|
SPL: NoRweindIterator
|
|
--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===
|