1--TEST--
2SimpleXMLElement->addAttribute()
3--SKIPIF--
4<?php if (!extension_loaded("simplexml")) die("skip"); ?>
5--FILE--
6<?php
7	$simple = simplexml_load_file(__DIR__."/book.xml");
8	$simple->addAttribute('type','novels');
9
10	var_dump($simple->attributes());
11	echo "Done";
12?>
13--EXPECT--
14object(SimpleXMLElement)#2 (1) {
15  ["@attributes"]=>
16  array(1) {
17    ["type"]=>
18    string(6) "novels"
19  }
20}
21Done
22