1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 16:22:37 +01:00
Files
archived-php-src/ext/simplexml/tests/SimpleXMLElement_addAttribute_basic.phpt
2019-03-15 22:55:30 +01:00

22 lines
398 B
PHP

--TEST--
SimpleXMLElement->addAttribute()
--SKIPIF--
<?php if (!extension_loaded("simplexml")) die("skip"); ?>
--FILE--
<?php
$simple = simplexml_load_file(__DIR__."/book.xml");
$simple->addAttribute('type','novels');
var_dump($simple->attributes());
echo "Done";
?>
--EXPECT--
object(SimpleXMLElement)#2 (1) {
["@attributes"]=>
array(1) {
["type"]=>
string(6) "novels"
}
}
Done