xref: /PHP-8.2/ext/simplexml/tests/profile03.phpt (revision 7f2f0c00)
1--TEST--
2SimpleXML [profile]: Accessing an attribute
3--EXTENSIONS--
4simplexml
5--FILE--
6<?php
7$root = simplexml_load_string('<?xml version="1.0"?>
8<root>
9 <child attribute="Sample" />
10</root>
11');
12
13echo $root->child['attribute'];
14echo "\n---Done---\n";
15?>
16--EXPECT--
17Sample
18---Done---
19