mirror of
https://github.com/php/php-src.git
synced 2024-10-21 00:12:34 +00:00
46 lines
618 B
Plaintext
46 lines
618 B
Plaintext
|
--TEST--
|
||
|
SPL: EmptyIterator
|
||
|
--FILE--
|
||
|
<?php
|
||
|
|
||
|
class EmptyIteratorEx extends EmptyIterator
|
||
|
{
|
||
|
function rewind()
|
||
|
{
|
||
|
echo __METHOD__ . "\n";
|
||
|
parent::rewind();
|
||
|
}
|
||
|
function valid()
|
||
|
{
|
||
|
echo __METHOD__ . "\n";
|
||
|
return parent::valid();
|
||
|
}
|
||
|
function current()
|
||
|
{
|
||
|
echo __METHOD__ . "\n";
|
||
|
return parent::current();
|
||
|
}
|
||
|
function key()
|
||
|
{
|
||
|
echo __METHOD__ . "\n";
|
||
|
return parent::key();
|
||
|
}
|
||
|
function next()
|
||
|
{
|
||
|
echo __METHOD__ . "\n";
|
||
|
parent::next();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
foreach (new EmptyIteratorEx() as $v) {
|
||
|
var_dump($v);
|
||
|
}
|
||
|
|
||
|
?>
|
||
|
===DONE===
|
||
|
<?php exit(0); ?>
|
||
|
--EXPECT--
|
||
|
EmptyIteratorEx::rewind
|
||
|
EmptyIteratorEx::valid
|
||
|
===DONE===
|