(PHP 5 >= 5.1.0)
LimitIterator::__construct — ساخت LimitIterator
ساخت LimitIterator از iterator به همراه offset شروع داده شده و بیشترین count.
LimitIterator جدید.
ایجاد OutOfRangeException اگر offset کمتر از 0 باشد یا count کمتر از -1 بتشپ.
Example #1 مثال LimitIterator::__construct()
<?php
$ait = new ArrayIterator(array('a', 'b', 'c', 'd', 'e'));
$lit = new LimitIterator($ait, 1, 3);
foreach ($lit as $value) {
echo $value . "\n";
}
?>
The above example will output:
b c d