mirror of
https://github.com/php/php-src.git
synced 2024-10-19 15:34:25 +00:00
25 lines
347 B
Plaintext
25 lines
347 B
Plaintext
|
--TEST--
|
||
|
Bug #46048 (SimpleXML top-level @attributes not part of iterator)
|
||
|
--FILE--
|
||
|
<?php
|
||
|
$xml = '
|
||
|
<data id="1">
|
||
|
<key>value</key>
|
||
|
</data>
|
||
|
';
|
||
|
$obj = simplexml_load_string($xml);
|
||
|
print_r(get_object_vars($obj));
|
||
|
echo "Done\n";
|
||
|
?>
|
||
|
--EXPECT--
|
||
|
Array
|
||
|
(
|
||
|
[@attributes] => Array
|
||
|
(
|
||
|
[id] => 1
|
||
|
)
|
||
|
|
||
|
[key] => value
|
||
|
)
|
||
|
Done
|