summaryrefslogtreecommitdiff
path: root/ext/spl/tests/iterator_039.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/spl/tests/iterator_039.phpt')
-rw-r--r--ext/spl/tests/iterator_039.phpt72
1 files changed, 36 insertions, 36 deletions
diff --git a/ext/spl/tests/iterator_039.phpt b/ext/spl/tests/iterator_039.phpt
index eb5018e07f..18f9a24168 100644
--- a/ext/spl/tests/iterator_039.phpt
+++ b/ext/spl/tests/iterator_039.phpt
@@ -5,52 +5,52 @@ SPL: LimitIterator and backward seeking
class NumericArrayIterator implements Iterator
{
- protected $a;
- protected $i = 0;
+ protected $a;
+ protected $i = 0;
- public function __construct($a)
- {
- echo __METHOD__ . "\n";
- $this->a = $a;
- }
+ public function __construct($a)
+ {
+ echo __METHOD__ . "\n";
+ $this->a = $a;
+ }
- public function valid()
- {
- echo __METHOD__ . "\n";
- return $this->i < count($this->a);
- }
+ public function valid()
+ {
+ echo __METHOD__ . "\n";
+ return $this->i < count($this->a);
+ }
- public function rewind()
- {
- echo __METHOD__ . "\n";
- $this->i = 0;
- }
+ public function rewind()
+ {
+ echo __METHOD__ . "\n";
+ $this->i = 0;
+ }
- public function key()
- {
- echo __METHOD__ . "\n";
- return $this->i;
- }
+ public function key()
+ {
+ echo __METHOD__ . "\n";
+ return $this->i;
+ }
- public function current()
- {
- echo __METHOD__ . "\n";
- return $this->a[$this->i];
- }
+ public function current()
+ {
+ echo __METHOD__ . "\n";
+ return $this->a[$this->i];
+ }
- public function next()
- {
- echo __METHOD__ . "\n";
- $this->i++;
- }
+ public function next()
+ {
+ echo __METHOD__ . "\n";
+ $this->i++;
+ }
}
$it = new LimitIterator(new NumericArrayIterator(array(12, 25, 42, 56)));
foreach($it as $k => $v)
{
- var_dump($k);
- var_dump($v);
+ var_dump($k);
+ var_dump($v);
}
echo "===SEEK===\n";
@@ -61,8 +61,8 @@ echo "===LOOP===\n";
foreach(new NoRewindIterator($it) as $k => $v)
{
- var_dump($k);
- var_dump($v);
+ var_dump($k);
+ var_dump($v);
}
?>