xref: /PHP-8.0/ext/simplexml/tests/profile02.phpt (revision f8d79582)
1--TEST--
2SimpleXML [profile]: Accessing an array of subnodes
3--SKIPIF--
4<?php if (!extension_loaded("simplexml")) print "skip"; ?>
5--FILE--
6<?php
7$root = simplexml_load_string('<?xml version="1.0"?>
8<root>
9 <child>Hello</child>
10 <child>World</child>
11</root>
12');
13
14foreach ($root->child as $child) {
15    echo "$child ";
16}
17echo "\n---Done---\n";
18?>
19--EXPECT--
20Hello World
21---Done---
22