xref: /PHP-8.0/ext/simplexml/tests/bug46048.phpt (revision a555cc0b)
1--TEST--
2Bug #46048 (SimpleXML top-level @attributes not part of iterator)
3--SKIPIF--
4<?php if (!extension_loaded("simplexml")) print "skip"; ?>
5--FILE--
6<?php
7$xml = '
8<data id="1">
9    <key>value</key>
10</data>
11';
12$obj = simplexml_load_string($xml);
13print_r(get_object_vars($obj));
14?>
15--EXPECT--
16Array
17(
18    [@attributes] => Array
19        (
20            [id] => 1
21        )
22
23    [key] => value
24)
25