xref: /php-src/ext/spl/tests/iterator_006.phpt (revision 7f2f0c00)
1--TEST--
2SPL: IteratorIterator and SimpleXMlElement
3--EXTENSIONS--
4simplexml
5--FILE--
6<?php
7
8$root = simplexml_load_string('<?xml version="1.0"?>
9<root>
10 <child>Hello</child>
11 <child>World</child>
12</root>
13');
14
15foreach (new IteratorIterator($root->child) as $child) {
16    echo $child."\n";
17}
18?>
19--EXPECT--
20Hello
21World
22