mirror of
https://github.com/php/php-src.git
synced 2025-08-19 08:49:28 +02:00
- Add new test
This commit is contained in:
parent
4439e2c530
commit
fbb48b6f26
1 changed files with 27 additions and 0 deletions
27
ext/spl/tests/iterator_038.phpt
Executable file
27
ext/spl/tests/iterator_038.phpt
Executable file
|
@ -0,0 +1,27 @@
|
|||
--TEST--
|
||||
SPL: RoRewindIterator and string keys
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("spl")) print "skip"; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
foreach(new NoRewindIterator(new ArrayIterator(array('Hello'=>0, 'World'=>1))) as $k => $v)
|
||||
{
|
||||
var_dump($v);
|
||||
var_dump($k);
|
||||
}
|
||||
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
int(0)
|
||||
string(5) "Hello"
|
||||
int(1)
|
||||
string(5) "World"
|
||||
===DONE===
|
||||
--UEXPECT--
|
||||
int(0)
|
||||
unicode(5) "Hello"
|
||||
int(1)
|
||||
unicode(5) "World"
|
||||
===DONE===
|
Loading…
Add table
Add a link
Reference in a new issue