</root>
');
-echo $root->child->attributes('reserved')['attribute'];
+$attr = $root->child->attributes('reserved');
+echo $attr['attribute'];
echo "\n---Done---\n";
?>
--EXPECT--
$root->register_ns('myns', 'reserved-ns');
-echo $root->child->attributes('reserved')['attribute'];
-echo $root->child->attributes('myns')['attribute'];
+$rsattr = $root->child->attributes('reserved');
+$myattr = $root->child->attributes('myns');
+
+echo $rsattr['attribute'];
+echo $myattr['attribute'];
echo "\n---Done---\n";
?>
--EXPECT--
</root>
');
-echo $root->child->attributes('reserved')['attribute'];
+$rsattr = $root->child->attributes('reserved');
+$spattr = $root->child->attributes('special');
+
+echo $rsattr['attribute'];
echo "\n";
-echo $root->child->attributes('special')['attribute'];
+echo $spattr['attribute'];
foreach ($root->child['attribute'] as $attr) {
echo "$attr\n";
}