1--TEST--
2Manually call __construct() - processing instruction variation
3--EXTENSIONS--
4dom
5--FILE--
6<?php
7
8$pi = new DOMProcessingInstruction('name1', 'value1');
9var_dump($pi->target, $pi->data);
10$pi->__construct('name2', 'value2');
11var_dump($pi->target, $pi->data);
12
13$doc = new DOMDocument();
14$doc->loadXML(<<<XML
15<?xml version="1.0"?>
16<container/>
17XML);
18$doc->documentElement->appendChild($pi);
19echo $doc->saveXML();
20
21$pi->__construct('name3', 'value3');
22$doc->documentElement->appendChild($pi);
23echo $doc->saveXML();
24
25?>
26--EXPECT--
27string(5) "name1"
28string(6) "value1"
29string(5) "name2"
30string(6) "value2"
31<?xml version="1.0"?>
32<container><?name2 value2?></container>
33<?xml version="1.0"?>
34<container><?name2 value2?><?name3 value3?></container>
35