repo.or.cz
/
tomato.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Updates to Tomato RAF including NGINX && PHP
[tomato.git]
/
release
/
src
/
router
/
php
/
ext
/
spl
/
tests
/
iterator_033.phpt
blob
548759ccbb0e52922ae8d210e7d601bd3d99a31e
1
--TEST--
2
SPL: ParentIterator
3
--FILE--
4
<?php
5
6
$it = new ParentIterator(new RecursiveArrayIterator(array(1,array(21,22, array(231)),3)));
7
8
foreach(new RecursiveIteratorIterator($it) as $k=>$v)
9
{
10
var_dump($k);
11
var_dump($v);
12
}
13
14
echo "==SECOND==\n";
15
16
foreach(new RecursiveIteratorIterator($it, 1) as $k=>$v)
17
{
18
var_dump($k);
19
var_dump($v);
20
}
21
22
?>
23
===DONE===
24
<?php exit(0); ?>
25
--EXPECT--
26
==SECOND==
27
int(1)
28
array(3) {
29
[0]=>
30
int(21)
31
[1]=>
32
int(22)
33
[2]=>
34
array(1) {
35
[0]=>
36
int(231)
37
}
38
}
39
int(2)
40
array(1) {
41
[0]=>
42
int(231)
43
}
44
===DONE===