mirror of
https://github.com/php/php-src.git
synced 2024-11-28 12:26:37 +08:00
Make it an interface with an code example as comment
This commit is contained in:
parent
39df192788
commit
883777623a
@ -1,16 +1,16 @@
|
||||
<?php
|
||||
|
||||
class SeekableIterator implements Iterator
|
||||
interface SeekableIterator implements Iterator
|
||||
{
|
||||
function seek($index) {
|
||||
$this->rewind();
|
||||
function seek($index);
|
||||
/* $this->rewind();
|
||||
$position = 0;
|
||||
while($position < $index && $this->hasMore()) {
|
||||
$this->next();
|
||||
$position++;
|
||||
}
|
||||
return $position;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
?>
|
Loading…
Reference in New Issue
Block a user