📄 iterator_030.phpt
字号:
--TEST--SPL: EmptyIterator access--SKIPIF--<?php if (!extension_loaded("spl")) print "skip"; ?>--FILE--<?php$it = new EmptyIterator;var_dump($it->valid());$it->rewind();var_dump($it->valid());$it->next();var_dump($it->valid());try{ var_dump($it->key());}catch(BadMethodCallException $e){ echo $e->getMessage() . "\n";}try{ var_dump($it->current());}catch(BadMethodCallException $e){ echo $e->getMessage() . "\n";}var_dump($it->valid());?>===DONE===<?php exit(0); ?>--EXPECT--bool(false)bool(false)bool(false)Accessing the key of an EmptyIteratorAccessing the value of an EmptyIteratorbool(false)===DONE===
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -