Annotation of embedaddon/php/ext/spl/tests/iterator_006.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: SPL: IteratorIterator and SimpleXMlElement
3: --SKIPIF--
4: <?php if (!extension_loaded('simplexml')) print "skip"; ?>
5: --FILE--
6: <?php
7:
8: $root = simplexml_load_string(b'<?xml version="1.0"?>
9: <root>
10: <child>Hello</child>
11: <child>World</child>
12: </root>
13: ');
14:
15: foreach (new IteratorIterator($root->child) as $child) {
16: echo $child."\n";
17: }
18: ?>
19: ===DONE===
20: <?php exit(0); ?>
21: --EXPECT--
22: Hello
23: World
24: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>