1--TEST--
2Manually call __construct() - attribute variation
3--EXTENSIONS--
4dom
5--FILE--
6<?php
7
8$attr = new DOMAttr("attribute", "my value");
9var_dump($attr->nodeName, $attr->nodeValue);
10$attr->__construct("newattribute", "my new value");
11var_dump($attr->nodeName, $attr->nodeValue);
12
13$doc = new DOMDocument();
14$doc->loadXML(<<<XML
15<?xml version="1.0"?>
16<container/>
17XML);
18$doc->documentElement->setAttributeNode($attr);
19echo $doc->saveXML();
20
21$attr->__construct("newnewattribute", "my even newer value");
22$doc->documentElement->setAttributeNode($attr);
23echo $doc->saveXML();
24
25?>
26--EXPECT--
27string(9) "attribute"
28string(8) "my value"
29string(12) "newattribute"
30string(12) "my new value"
31<?xml version="1.0"?>
32<container newattribute="my new value"/>
33<?xml version="1.0"?>
34<container newattribute="my new value" newnewattribute="my even newer value"/>
35